Most of the shared hosting platforms are providing SFTP access to the end-users as a secure file transfer protocol. There are a lot of free and open source GUI platforms for ftp, SFTP and SSH connections, but if you are a fan of the Linux command-line tool stay with me, as I’m about to show you how to establish a SFTP connection to a remote SFTP server.
How to connect with SFTP through command line
SFTP is a protocol that is leaning on SSH and uses the same method for authentication. So whether you want to connect through password or SSH keys it’s up to you, but the recommended and secure way is through SSH keys.
Step 1. To test the connection try to establish SSH connection.
Step 2. If step 1 is working fine, run the
Step 3. By default, SFTP is using the same default SSH port
22. If you want to open an sftp session on a different port, run:
sftp -oPort=some_port user@server_ip_or_remote_hostname
Once you are connected if you need to learn some useful SFTP command you can get help with:
For more specific requirements please don’t hesitate to raise a question below. Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.