ssh – How to Use SSH to Transfer Files from Computer A to Local Computer

directoryssh

I am trying to get some files off of my school Linux account using ssh. I have got the connection to work using:

scp <school_server>: ~/folder I want ~/where I want to go.

But when it goes to transfer folder it gives me the message:

not a regular file

The file contains .java files, and I want the whole folder.

Best Answer

To recursively copy a whole directory using scp, you need to add the -r switch

scp -r remotehost:/path/to/remote/dir/ /path/to/local/dir/

Related Question