How to Open and Close an sftp Connection to a Remote System
Open a connection to a remote system by using the sftp command.
$ sftp remote-system
If the connection succeeds, a confirmation message and prompt are displayed.
If prompted, type your password.
If the sftp interface accepts your password, it displays a confirmation message and the (sftp>) prompt.
You can now use any of the commands that are supplied by the sftp interface, including help. The principal commands are summarized in Figure 5, Table 5, Essential sftp Commands.
Close the sftp connection.
Opening an sftp
Connection to a Remote System
This sftp session was established to connect to the remote system host1:
$ sftp host1
Connecting to host1.