Java7
sftp
How To sftp From Windows Command Prompt (Using psftp)
Oct 11th
Those familiar with Linux environment may remember the sftp command, secure file transfer protocol, we use this protocol to primarily transfer files between Linux boxes. Although it is also possible to use the same protocol from Windows to Linux, we seldom get to do so from the windows command line, and always through file transfer protocol GUI clients such as Filezilla.
If you are not familiar with ftp, ftp basically is a mechanism you use to upload and download files from machines such as a server.
To use sftp from a windows command prompt, you need an additional piece of software called psftp (putty sftp), the guide shows you the installation.
This guide shows you how you can use sftp from a MS windows box to place / get files from/to a Linux box. You will not need GUI clients such as Filezilla going forward.
Tools Requisite
1) psftp (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
You need this piece of software from PuTTY which is a win32 executable binary for use in Windows XP/7/Vista/*. You are unable to proceed if you do not download this piece of software.
Download
Download psftp from the downloads page.
Installation
After downloading psftp, unzip and place the executable onto a permanent installation directory such as C:/program files/psftp. You may create a folder to keep psftp in the program files directory.
Add psftp Into Environment Path
You need to add psftp into the environment path so that you may use it from the command line.
> For Windows 7 Users
Start > My Computer > Right Click on “My Computer” > Click on “Properties” from the context menu
On the pop up window, select “Advanced System Settings” from the left side bar.
On the System Properties menu, select “Environment Variables”
Locate the “Path” system variable, select “edit …”.
Now, carefully append the directory path to psftp onto the back of the last variable value as shown.
Once done, click on “Ok”, and close the environment variable and system properties window.
Test psftp From Command Line
Open up command prompt (Start > Run > “Cmd” > Enter)
Type in “psftp” and press <enter>
If you see the output above, you installed the environment for psftp correctly. Congratulations!
Installation Successful
You may use sftp from the command line anytime by bringing up the command prompt.
Sample Usage








