< All Topics

Connecting through SFTP by Command Line (CMD)

To connect to Hosted~FTP~ by SFTP using the command line, you need to run the following command:
“username@ftp.hostedftp.com” or “Username@your-custom-domain”
This will Return the following:
Password authentication
You then enter your password, and a live connection will be established.

For example, You are trying to login to your Hosted~FTP~ account to download a file called “test.txt” in a folder called “article”

Your script will look like this:

>> sftp username@hostname For example sftp hostedftptutorial@ftp.hostedftp.com

>>Password or the file path if you are using a PKI key pair (more info here).

>> Remote command to change directory “CD remote folder” For example “cd article”

Then to download the folder, you run the command >> Get “test.txt”

SFTP Command Line Commands

The following image below shows commands you can run during an SFTP connection and their description: sftp command line

Table of Contents