Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mrjamin

macrumors 65816
Original poster
Feb 6, 2003
1,161
1
Strongbadia
SCP on my powerbook has gone mental! It simply isn't copying files any more. Here's what happens:

Code:
12:45:47 | compy386:~ benlancaster$ scp file server:~/
benlancaster@server's password: 
Fri Sep 3 12:46:04 BST 2004
12:46:06 | compy386:~ benlancaster$

'server' is my local Linux machine, called 'server' via my /etc/hosts

I have the same username on my server, and my mac (same GID and UID too), so that's not what's gone wrong, seeing as I can't scp anything to anywhere from my powerbook, but can scp to/from my server without any problems!

Here's what "scp -v file server:~/" outputs:
Code:
12:45:06 | compy386:~ benlancaster$ scp -v file server:~/
Executing: program /usr/bin/ssh host server, user (unspecified), command scp -v -t ~/
OpenSSH_3.6.1p1+CAN-2003-0693, SSH protocols 1.5/2.0, OpenSSL 0x0090702f
debug1: Reading configuration data /etc/ssh_config
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: Connecting to server [192.168.1.99] port 22.
debug1: Connection established.
debug1: identity file /Users/benlancaster/.ssh/identity type -1
debug1: identity file /Users/benlancaster/.ssh/id_rsa type -1
debug1: identity file /Users/benlancaster/.ssh/id_dsa type 2
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.5p1
debug1: match: OpenSSH_3.5p1 pat OpenSSH_3.2*,OpenSSH_3.3*,OpenSSH_3.4*,OpenSSH_3.5*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.6.1p1+CAN-2003-0693
debug1: An invalid name was supplied
Configuration file does not specify default realm

debug1: An invalid name was supplied
A parameter was malformed
Validation error

debug1: An invalid name was supplied
Configuration file does not specify default realm

debug1: An invalid name was supplied
A parameter was malformed
Validation error

debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'server' is known and matches the RSA host key.
debug1: Found key in /Users/benlancaster/.ssh/known_hosts:18
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/benlancaster/.ssh/identity
debug1: Trying private key: /Users/benlancaster/.ssh/id_rsa
debug1: Offering public key: /Users/benlancaster/.ssh/id_dsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
benlancaster@server's password: 
debug1: Authentication succeeded (password).
debug1: fd 5 setting O_NONBLOCK
debug1: fd 6 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending command: scp -v -t ~/
debug1: channel 0: request exec
debug1: channel 0: open confirm rwindow 0 rmax 32768
Fri Sep 3 12:45:19 BST 2004
debug1: channel 0: read<=0 rfd 5 len 0
debug1: channel 0: read failed
debug1: channel 0: close_read
debug1: channel 0: input open -> drain
debug1: channel 0: ibuf empty
debug1: channel 0: send eof
debug1: channel 0: input drain -> closed
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: rcvd eof
debug1: channel 0: output open -> drain
debug1: channel 0: obuf empty
debug1: channel 0: close_write
debug1: channel 0: output drain -> closed
debug1: channel 0: rcvd close
debug1: channel 0: almost dead
debug1: channel 0: gc: notify user
debug1: channel 0: gc: user detached
debug1: channel 0: send close
debug1: channel 0: is dead
debug1: channel 0: garbage collecting
debug1: channel_free: channel 0: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.1 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 0
12:45:20 | compy386:~ benlancaster$

Any thoughts?

Thanks in advance!

MrJ
 
I guess I'll ask a couple of questions. Have you tried transferring a different file?

Your scp output matches mine except for this:

Code:
debug1: Authentication succeeded (keyboard-interactive).
debug1: fd 4 setting O_NONBLOCK
debug1: fd 5 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending command: scp -v -t ~/
debug1: channel 0: request exec
debug1: channel 0: open confirm rwindow 0 rmax 32768
Sending file modes: C0644 1083 local.cf
local.cf                                                                                                       100% 1083   974.7KB/s   00:00    
debug1: channel 0: read<=0 rfd 4 len 0
debug1: channel 0: read failed
debug1: channel 0: close_read
debug1: channel 0: input open -> drain
debug1: channel 0: ibuf empty
debug1: channel 0: send eof
debug1: channel 0: input drain -> closed
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: rcvd eof
debug1: channel 0: output open -> drain
debug1: channel 0: obuf empty
debug1: channel 0: close_write
debug1: channel 0: output drain -> closed
debug1: channel 0: rcvd close
debug1: channel 0: almost dead
debug1: channel 0: gc: notify user
debug1: channel 0: gc: user detached
debug1: channel 0: send close
debug1: channel 0: is dead
debug1: channel 0: garbage collecting
debug1: channel_free: channel 0: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.2 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 0

Yours appears to just flag the date, so I'm curious if the file is causing the issue.

EDIT: Just for information, your usernames, GID, and UID do not need to match on the two systems for scp to work.
 
tomf87 said:
I guess I'll ask a couple of questions. Have you tried transferring a different file?

Yours appears to just flag the date, so I'm curious if the file is causing the issue.

EDIT: Just for information, your usernames, GID, and UID do not need to match on the two systems for scp to work.

Yep, tried several files (of different types): none of them work.

I realise that my GID/UID don't need to be the same, I was just explaining why there was no username before the 'server:~/' - I'm not entirely sure why i mentioned my GID and UID!

I think the problem must lie with the keys somewhere along the line, though I have no idea what may have cause the problem (whatever it is). Interestingly, I'm also no longer able to use SFTP (aka SCP) from within Dreamweaver or Transmit. At first I thought it may be a firewall problem, but there is no firewall or port restrictions between my mac and my server! The only firewall is on my router (which is NAT enabled), but inbound/outbound scp/ssh actions from my server to the outside world work fine.

Most odd!

Ben
 
Perhaps your ~/.ssh/known_hosts file is screwy. You could try clearing everything
out (or just the entry for your Linux server).

Can you still ssh to the Linux box?
 
Hmmm. This might be entirely unrelated, but I've been having difficulty connecting via ssh to my home system lately, whereas I had no problem with it before. I sort of blew it off, but now I'll look into it more. A cursory look at sharing options and the router appear to indicate ssh should work fine for me....
 
monkeydo_jb said:
Perhaps your ~/.ssh/known_hosts file is screwy. You could try clearing everything
out (or just the entry for your Linux server).

Can you still ssh to the Linux box?

Ah hah! the problem was with my .bashrc file! Some dodgy control characters appeared in it (probably when it was editted using a dodgy text editor).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.