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.

What is the procedure for resetting an FTP user’s password?

This article explains what FTP is and how to change an FTP user’s password. What…

How Can You Increase The Maximum File Upload Size Limit In PHP

In this tutorial, we’ll show you how to set a PHP upload size restriction. Introduction:-The…

Creating Email IDs for an Additional Domain

If you’ve added a new domain to your hosting account, you may also want to…