
There are a number of ways to securely transfer files between systems.
- The PSFTP command line tool can be used to for SFTP (Secure FTP) to securetly transfer files between systems, from a remote system to your PC, or vice versa. This has the advantage of being able to transfer files between Linux, Mac and Windows systems.
- The scp command (Secure Copy Protocol) could be used to securely transfer files between Linux systems.
There are a number of different tools that can be used to connect to an FTP / FTPS / SFTP server.
- Windows or Linux command line prompt
- Scripting tool (e.g. Bash, Perl, PowerShell, Python, et cetera)
- The PSFTP command line tool PSFTP.exe (see Installing PuTTY PSFTP)
Using a Windows or Linux command line prompt, the sftp command followed by the hostname or IP address of the SFTP server can be used to connect to the SFTP server.
[john.doe@localhost ~]$ sftp sftp.example.com
Welcome! Please login.
password
Enter password for john.doe
Password:
By default, the connection will be made as your local user. If you want to connect as some other user, you can include the username.
[john.doe@localhost ~]$ sftp jane.doe@sftp.example.com
Welcome! Please login.
password
Enter password for jane.doe
The SFTP server should be configured to expect you to connect to a certain directory on the SFTP server. The target directory can be included.
[john.doe@localhost ~]$ sftp jane.doe@sftp.example.com:dir[/tmp/]
Welcome! Please login.
password
Enter password for jane.doe
The -v (debug1) or -vv (debug2) or -vvv (debug3) flags can be included to display debug output.
sftp -vvv jane.doe@sftp.example.com
The connection can also be made by including an SSH key.
[john.doe@localhost ~]$ sftp -i example.ppk jane.doe@sftp.example.com:dir[/tmp/]
Welcome! Please login.
password
Enter password for jane.doe
Did you find this article helpful?
If so, consider buying me a coffee over at