Nilesh Agrawal Nilesh Agrawal - 1 year ago 82
Linux Question

How can I get a folder from remote machine to local machine?

I am trying

scp -r usernameipaddress:/path /pathwhereIwanttocopy
, but I am getting it as connection refused.

How can I get it? How can I get connected?

Answer Source

The -r flag should work. In your example you seem to be forgetting the name of the folder you want to copy. Try:

scp -r nameOfFolderToCopy username@ipaddress:/path/to/copy/

to copy a folder from your local computer to a remote one. Or

scp -r username@ipaddress:/path/of/folder/to/copy /target/local/directory

to copy a folder from a remote machine to your local one.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download