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>@

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 port 22: Connection timed out
lost connection

So, how can I fix it?

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

Syntax of scp is :


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

$ scp /home/john/foo luther@

where luther is a username on


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

scp /path/to/file

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


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.