1

I am trying to download a file from a computer that I have connected with using ssh. I type into the terminal

scp /path/to/file <name of my computer>@192.168.0.15:home/desktop

This file isn't big (about 35 mb), but after typing this command literally nothing happens, and after some time such message appears:

ssh: connect to host 192.168.0.15 port 22: Connection timed out
lost connection

So, how can I fix it?

  • scp /path/to/file <name of my computer>@192.168.0.15:/home/desktop – Rahul Nov 27 '16 at 12:45
1

Syntax of scp is :

$ scp SOURCE DESTINATION


For example, if I want to copy a file named foo in my home directory to the home directory of a remote machine 192.168.0.15, running ssh server, the syntax would be:

$ scp /home/john/foo luther@192.168.0.15:/home/luther/

where luther is a username on 192.168.0.15

0

Are you sure of the syntaxe of your scp command ? Try :

scp /path/to/file 192.168.0.15:.

You can also check /var/log/syslog file of the 198.168.0.15 server, to check your connection

0

There can sometimes be firewall issues. If having a terminal open on your computer and listing the source as from the ssh server won't work, try opening a terminal on the ssh server and setting the destination to your local computer. In other words, try SENDING it from the ssh server instead of BRINGING it from there, or vice versa. Does that make sense? This often fixes the issue for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.