How to transfer files using PuTTY PSFTP

Home > Search > How-to
  by

To be able to transfer files from a client machine to an SSH server using PuTTY PSFTP, download PSFTP from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html.  Double-click on the PSFTP.exe file, and a command line prompt will appear with message psftp: no hostname specified; use "open host.name" to connect.  Type open, your SSH username and the IP address or domain name of your SSH server.  For example, open jeremy@example.com. If your SSH server is configured properly, you should be prompted to enter your SSH password. Type your password, and you should be connected to your SSH server. You can now interact with the command line prompt using command commands, such as PWD to list the current directory and CD to change the directory.

Let's say you have a a file on your client, such as C:\\users\\username\\Downloads\\samplefile1.txt, and you want to transfer this file to /srv/samba/share on the SSH server. Use the lcd (local change directory) to change to the C:\\Users\\username\\Downloads folder on the client.

psftp > lcd C:\\Users\\username\\Downloads

 

Use the cd (change directory) to change the the /srv/samba/share directory on the SSH server.

psftp > cd /srv/samba/share

 

Use the put command to transfer the samplefile1.txt file from the client to the server.

psftp > put samplefile1.txt

 

Use the ls (list) command to verify that the samplefile1.txt file was successfully transferred to the server.

psftp > ls
-rw-rw-r--    1   jeremy  jeremy   0   Dec 4  19:07   samplefile1.tx

 

Use the exit command to disconnect from the SSH server.

psftp > exit

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments