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.

How To Manually Update WordPress

This article explains how to manually update a WordPress site. Follow these steps to upgrade…

Bridging vs Routing – Major Difference?

When connecting systems through a VPN, two common processes are used: Bridging and Routing There…

How Can You Change The Hostname In cPanel Web Host?

In this post, we will show you how to change your cPanel web host’s hostname.…