Tip #31: Simple Portable SFTP Server for Windows XP
Today's tip is on providing a small, portable SFTP server for Windows XP for SSH encrypted file transfers... While there are ports of OpenSSH available for Windows machines, we'll be taking a look at a tiny, single executable, SFTP server for Windows...
The utility we'll be using is called the Mini SFTP Server from CoreFTP, and it's provided free of charge from the developers of the CoreFTP FTP Client and Server... The single executable format makes it ideal for carrying around on your USB flash drive...
The Mini SFTP Server can be downloaded from here... There is no install process, just launch the msftpsrvr.exe executable after you have completed downloading it...
After you have launched the msftpsrvr.exe application, you can configure a single User ID / Password combination, the port number on which the server will run, and the directory which will serve as the root path for the server... After you have adjusted the settings to your needs, simply click on the Start button to start the server... If you are behind a router, you will need enable port forwarding to your machine using the port you specified in the configuration...
To connect to your SFTP server, remote users can use a SFTP client application of their choice, including pscp from the PuTTY developers, as well as WinSCP...
After you have run the application once, it stores the values you've supplied into the registry for future use... The registry keys can be deleted if you'd like (HKCU/Software/FTPWare), or you can simply clear the fields of the application prior to exiting the program to clear the registry entries...
To start the server process immediately upon launch (using the values previously stored in the registry), you can add the -start switch to the shortcut or from the command line, (i.e. msftpsrvr.exe -start)...
If you have any questions, please leave a comment...
The utility we'll be using is called the Mini SFTP Server from CoreFTP, and it's provided free of charge from the developers of the CoreFTP FTP Client and Server... The single executable format makes it ideal for carrying around on your USB flash drive...
The Mini SFTP Server can be downloaded from here... There is no install process, just launch the msftpsrvr.exe executable after you have completed downloading it...
After you have launched the msftpsrvr.exe application, you can configure a single User ID / Password combination, the port number on which the server will run, and the directory which will serve as the root path for the server... After you have adjusted the settings to your needs, simply click on the Start button to start the server... If you are behind a router, you will need enable port forwarding to your machine using the port you specified in the configuration...
To connect to your SFTP server, remote users can use a SFTP client application of their choice, including pscp from the PuTTY developers, as well as WinSCP...
After you have run the application once, it stores the values you've supplied into the registry for future use... The registry keys can be deleted if you'd like (HKCU/Software/FTPWare), or you can simply clear the fields of the application prior to exiting the program to clear the registry entries...
To start the server process immediately upon launch (using the values previously stored in the registry), you can add the -start switch to the shortcut or from the command line, (i.e. msftpsrvr.exe -start)...
If you have any questions, please leave a comment...
9 Comments:
At 7/31/2006 7:14 PM, Anonymous said…
James,
Glad to see you used the two apps I suggested yesterday in your latest tech tip (#31), though I am puzzled why you would not let my comment be posted on Tip #23.
Sincerely,
Miles
miles@tinyapps.org
At 7/31/2006 9:33 PM, Jameser said…
Hi Miles... Sorry for the delay in posting your comment on tip #23...
Thanks for actually visiting my tips more than once... :-)
Regarding the PSFTP in your previous comment, how does it differ from PSCP? Are they basically the same app, or does PSFTP provide more functionality? Just curious... I've only used PSCP as it seemed to do everything I needed SFTP-wise...
Thanks again...
James...
At 8/01/2006 1:57 AM, Anonymous said…
Aloha, James! Many thanks for your reply. And thank you for addressing the issues raised in my comment on Tip #23.
Regarding PSFTP vs.PSCP:
-----
1. PSCP should work on virtually every SSH server. PSFTP uses the new SFTP protocol, which is a feature of SSH-2 only. (PSCP will also use this protocol if it can, but there is an SSH-1 equivalent it can fall back to if it cannot.)
2. PSFTP allows you to run an interactive file transfer session, much like the Windows ftp program. You can list the contents of directories, browse around the file system, issue multiple get and put commands, and eventually log out. By contrast, PSCP is designed to do a single file transfer operation and immediately terminate.
-----
Here are the PSFTP commands, which closely mirror those of FTP (sorry about the format - Blogger comments won't let me use tt, pre, code, etc):
! run a local command
bye finish your SFTP session
cd change your remote working directory
chmod change file permissions and modes
close finish your SFTP session but do not quit PSFTP
del delete files on the remote server
dir list remote files
exit finish your SFTP session
get download a file from the server to your local machine
help give help
lcd change local working directory
lpwd print local working directory
ls list remote files
mget download multiple files at once
mkdir create directories on the remote server
mput upload multiple files at once
mv move or rename file(s) on the remote server
open connect to a host
put upload a file from your local machine to the server
pwd print your remote working directory
quit finish your SFTP session
reget continue downloading files
ren move or rename file(s) on the remote server
reput continue uploading files
rm delete files on the remote server
rmdir remove directories on the remote server
Yours Sincerely,
Miles
At 4/11/2007 8:07 AM, Fork said…
This tip has been a god-send for exchanging files with my paranoid room mate! Thank you!
At 12/08/2007 1:34 PM, Anonymous said…
Jameser,
Thanks for the article, this is exactly what I was looking for.
BoorT
At 1/30/2008 4:10 AM, Unknown said…
Needed a USB portable SFTP Server solution to allow transfer of certificates onto a Cisco CSS load balancer. This is just the ticket. Many thanks for the steer.
JIM
At 7/19/2012 3:05 AM, Shivashankar Chincholi said…
Thanks for the article, this is exactly what I was looking for.
nice to work on unit testing.
At 4/06/2014 9:47 AM, Giandomenico Plaino said…
A very nice piece of software, thanks man!
At 4/11/2014 5:38 AM, Sharuzzaman said…
After 8 years you post this tip, it just help me with my work of transferring file from Linux server to Windows desktop. Thanks for the tip! :)
Post a Comment
<< Home