Website Help
FTP inquiries
How to establish a SFTP connection to your website via Terminal?

How to establish a SFTP connection to your website via Terminal?

To establish an SFTP connection to your account, first go to your Site Tools > Devs > SSH Keys Manager and generate a new SSH key pair.

SSH keys can be used to access all files on the website via SFTP/SSH and cannot be configured to limit access to specific folders. It is crucial to store these keys securely to prevent unauthorized access.

Then under Manage SSH Keys, go to the kebab menu > Private Key. Copy the content of the text area, paste it in an empty file on your computer and save it. Change the permissions of the saved file to 600:

chmod 600 /Users/youruser/private_key

You should replace /Users/youruser/private_key with the location of your private key text file.

Next, load the SSH key to your ssh-agent with this command:

ssh-add /Users/youruser/private_key

You will be prompted for the key’s password that you used when you created it from Site Tools.

Now, to connect to the desired website via SFTP, open a new Terminal window and type in the following command:

sftp -P 18765 username@hostname

The username and hostname are the same as the SSH credentials, which are available in Site Tools > Devs > SSH Keys Manager. Under Manage SSH Keys, choose the key which was created earlier and go to the kebab menu > SSH Credentials.

N.B. During your first connection, you will be prompted to store the server’s fingerprint. Type “yes” if you plan to connect to the same server again.

Share This Article