7.2 Use sftp Interactively

You can use an interactive sftp session to execute one or more file management commands securely on a remote computer.

To open an interactive sftp session

  1. Connect to a remote host. For example:

    sftp joe@myhost.com

    NOTE:You can omit the user name if your name on the Secure Shell server is the same as your current user name.

    After a successful connection is established, the following prompt appears:

    sftp>
  2. Do any of the following:

    To

    Use

    View a list of supported commands

    help; for example:

    sftp> help

    Learn more about supported commands

    help command; for example:

    sftp> help put

    Transfer and manage files

    Use any of the supported sftp commands. For example, to transfer the file demo from the local working directory to the remote working directory:

    sftp> put demo

    End the session

    quit; for example:

    sftp> quit

NOTE:If you launch sftp without specifying a host name, you can use the interactive open and close commands to connect to one or more hosts during your interactive session.