If you are unsure of how to open and close an SFTP connection to a remote system, we have you covered. Just check out the steps mentioned below to get all the information you need.

Command Description
sftp remote-system Builds an sftp connection to a remote system. 
sftp remote-system:file Copies the named file from the remote system.
bye Quits the sftp session.
help Lists all sftp commands.
ls Creates lists of the contents of the remote working directory.
lls Creates lists of the contents of the local working directory.
pwd Shows the name of the remote working directory.
cd Changes the remote working directory.
lcd Changes the local working directory.
mkdir Creates a directory on the remote system.
rmdir Deletes a directory on the remote system.
get Copies a file from the remote working directory to the local working directory.
put Copies a file from the local working directory to the remote working directory.
delete Deletes a file from the remote working directory.

How to Open and Close an sftp Connection to a Remote System?

  1. Use this sftp command to open a connection to a remote system.
    $ sftp remote-system

When the connection succeeds, there will be a prompt along with a confirmation message prompted.

  1. Insert your password if asked.
    Password: password

If your password is accepted by the sftp interface, you will have the (sftp>) prompt and a confirmation message displayed. The commands provided by the sftp interface can be used now, including help.

  1. Close the sftp connection.
    sftp> bye

Popular Posts You May Read

Explore more hosting insights, tips and industry updates.

Functions of a Web Servers

The client’s browser divides the URL into the diff. parts dividing including address, path name…

MS SQL Server Data Types: A Helpful Guide for Developers

MS SQL Server Data Types: A Helpful Guide for Developers

Once you know how data is actually stored, working with databases becomes a lot easier.…

How to Wipe Out a MySQL Database Using cPanel

This guide explains step-by-step how to delete a MySQL database in cPanel. Steps to Wipe…