How do I transfer files using SFTP?

You can use 'sftp' command from the local Xshell prompt to transfer files.

  1. Use the following 'sftp' command and connect to a server where files will be transferred.

    sftp [user@]host [port]
    
    Example of command line)
    
    [C:\~]$ sftp myhostname
    
    [C:\~]$ sftp myusername@myhostname
    
    [C:\~]$ sftp myusername@myhostname 12345
  2. On the sftp prompt, 'help' command lists a set of available sftp commands.

    sftp:/home/myusername> help
    bye						finish your SFTP session
    cd						change your remote working directory
    clear					clear screen
    exit					finish your SFTP session
    explore					explore your local directory
    get						download a file from the server to your local machine
    help					give help
    lcd						change and/or print local working directory
    lls						list contents of a local directory
    lpwd					print your local working directory
    ls						list contents of a remote directory
    mkdir					create a directory on the remote server
    mv						move or rename a file on the remote server
    put						upload a file from your local machine to the server
    pwd						print your remote working directory
    quit					finish your SFTP session
    rename					move or rename a file on the remote server
    rm						delete a file
    rmdir					remove a directory on the remote server
    sftp:/home/myusername>
    
  3. Following is sample sequences of uploading files.
    1. Use 'cd' command to move to a directory where you want to upload files to. (Server)
    2. Use 'lcd' command to move to a directory where the files, which will be uploaded, are saved. (Windows)
    3. Check the file name with 'lls' command.
    4. Start uploading with 'put' command.


If Xftp is already installed, Xshell can create an Xftp session from the current Xshell session for easier and more secure file transfer.

For more information on how to integrate Xftp and Xshell, please refer to the How can I open an Xftp session from the current Xshell session?.