Skip to content

Download / Upload local files to a remote server using SSH and PuTTY

by saif71 | Last Updated:
June 23, 2022 | 06:20 AM
Download / Upload local files to a remote server using SSH and PuTTY

Open SSH Client is now built-in in Windows 10, from Windows 10 Fall Creators Update RS3 v. 1709 and enabled by default from Windows 10 April 2018 Update v. 1803. So you can do some basic operations like SSH a server, rename files, delete files, check the list of directories, etc from CMD without starting PuTTY.


Connect sever with windows 10 built-in Open SSH Client

ssh username@123.123.123.123 -p 10022

-p defines the port. Default is 22. If you want to use default port then don’t need to use -p flag.

Press enter it ask for our password. Type or password and hit enter. If you want to copy-paste password, copy password from somewhere then on your command line just click “Right-Click” on your mouse. Remember password isn’t visible in command-line interface.

ls

After successful login . Type ls to see the list of files and folder in the directory. Also you may be need to jump of the directory using ” cd ../ ” if you want to change directory.


Copy full directory from Remote to Local Machine with OpenSSH Client

For this you will need to use PSCP from PuTTY. Download and install PuTTY first. Either from there website or with chocolatey. I would prefer chocolatey. Simply run your CMD as administrator and typo following.

choco install putty
refreshenv

Then run following command.

pscp -P 10022 -r username@123.123.123.123:/folder_path c:\mytemp

and check your C:\mytemp folder. You may change the destination folder as your wish. -r flag used for recursively copy files.


Copy full directory from Local machine to Remote server using OpenSSH Client

pscp -P 10022 -r c:\mytemp username@123.123.123.123:/folder_path

Copy file from Remote server to Local machine with OpenSSH Client

Run following command.

pscp -P 10022 username@123.123.123.123:/folder_path/filename.txt c:\mytemp\filename.txt

and check your C:\mytemp folder. You may change the destination folder as your wish.


Copy files from Local machine to Remote server with OpenSSH Client

pscp -P 10022 c:\mytemp\filename.txt username@123.123.123.123:/folder_path/

About Author: 🎉 Salman Hossain Saif (internet username: Saif71).
Lead UX Engineer @ManagingLife LLC. Specialized in design systems, user flow, UX writing, and a certified accessibility specialist. Loves travel and creating meaningful content. Say hi @imsaif71

You may also like


🎉 Have a nice day!