I am trying to SCP a file I downloaded using this command:
scp -v agenadinik@slabrams-desktop:/home/agenadinik/Downloads/agraph-4.2-linuxamd64.64.tar.gz agenadin@uc3-dev:/udfr/agraph-4.2-linuxamd64.64.tar.gz
The output is this:
Executing: /usr/bin/ssh '-v' '-x' '-oClearAllForwardings yes' '-n' '-l' 'agenadinik' 'slabrams-desktop' 'scp -v' '/home/agenadinik/Downloads/agraph-4.2-linuxamd64.64.tar.gz' 'agenadin@uc3-dev:/udfr/agraph-4.2-linuxamd64.64.tar.gz'
OpenSSH_5.3p1 Debian-3ubuntu5, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to slabrams-desktop [127.0.1.1] port 22.
debug1: Connection established.
debug1: identity file /home/agenadinik/.ssh/identity type -1
debug1: identity file /home/agenadinik/.ssh/id_rsa type -1
debug1: identity file /home/agenadinik/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3p1 Debian-3ubuntu5
debug1: match: OpenSSH_5.3p1 Debian-3ubuntu5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu5
debug1: SSH2_MSG_KEXINIT sent
Read from socket failed: Connection reset by peer
Any ideas why it wouldn't work? Also, the only reason I am doing that is because I am not sure how to download that file from the ssh command prompt directly. Is there a way to just download that file from the shell of Putty's ssh client? What are my options here? :)
Thanks you!
I'm not sure where putty (the windows ssh client) comes into play... It looks like you're copying between two linux (ubuntu) servers.
Does it work if you login directly to one of the servers, so that you aren't remotely copying between two remote servers? E.g., instead of:
...first login to agenadinik@slabrams-desktop, and then run:
Or, vice-versa; login to agenadin@uc3-dev and run:
Breaking down the command in this way might help debug & track down permission/connection issues....
Copying to a windows pc from the remote linux server (executing the copy from teh remote linux box -- assuming you're using putty on windows to ssh into a remote unix/linux box) won't work unless you have an sshd server running on windows (e.g., cygwin sshd). If you have that, then you can login to the remote linux host, and, using your windows hostname or ip address (and, it helps to avoid windows path issues and just copy to your windows $HOME),
...But typically people don't have sshd running on windows, and it isn't always that simple to set up.
Edit: just to clarify: copying to windows & running the scp/sftp commands on windows (e.g., using putty's psftp or pscp) is trivial, as it only remotely logs into the linux server & copies the file locally.
PuTTY has an SCP client & an SFTP client, both on the download page. Or you could grab FileZilla.
As for the issue, can
slabrams-desktop
resolveuc3-dev
and vice-versa? Can they connect to each other?If scp is not possible and the transfer should be between 2 *nix hosts, you can always cat the file over ssh.
serverA: local machine serverB: remote machine
on serverA you do: ssh serverB "cat /path/to/remote/file" > /path/to/local/file
this way you order serverB to cat the remote file while grabbing the output of this and putting it in the local file.