Secure File Transfer Protocol (sftp)
How to transfer files using the SFTP command line tool
The sftp command provides an interactive file transfer client, although it can be used in a one-off transfer manner to get individual files. Whilst it is more complex to use than scp, it may be more efficient when you have many files to transfer that can't be specified (easily) with wildcards, especially when you are connecting to a system using multi-factor authentication (such as BMRC's cluster).
In addition, some services only support SFTP connections, such as the WIN MRI download system when used with SFTP Only accounts.
The basic sftp command syntax is
where destination is of the form user@host:path. As with scp, user@ is optional if the username is the same on your computer as the remote service and if path is not specified then it will use your remotely configured home folder.
When you have authenticated you will get a prompt that can be used to move around the remote file system; use 'cd' and 'ls' as you would on a UNIX system to change directory and list the contents. You can also interact with your local file system with the 'lcd' and 'lls' equivalents.
To upload files/folders use 'put' and to download use 'get' with the filename of the local or remote object respectively.