How to run OpenSSH on a Windows. SSH,SCP,SFTP to Windows
If you're new here, you may want to subscribe to Windows Reference RSS feed Thanks for visiting!
Did you know, you can SSH into a PC or a Windows Server? Copy files using SCP ? or even SFTP (Secure FTP) onto a Windows machine??
Yes, you can run OpenSSH, an OpenSource Secure Shell Server for UNIX and LINUX systems. “OpenSSH for Windows” is a free package that installs a minimal OpenSSH server and client utilities in the Cygwin package without needing the full Cygwin installation.
The “OpenSSH for Windows” package provides full SSH/SCP/SFTP support. SSH terminal support provides a familiar Windows Command prompt, while retaining Unix/Cygwin-style paths for SCP and SFTP. This is a unix style command prompt only access to windows server to run commands or copy files using SCP or SFTP. Access can be setup for either a Domain user or a local user on the system.
“OpenSSH for Windows” works well on Windows NT, Windows 2000, Windows XP and WIndows 2003. Simply download and install the package from here.
Once done, from the command prompt navigate to “C:\Program Files\OpenSSH\bin” folder as follows:
C:\> cd “C:\Program files\OpenSSH\bin”
Add Group Permissions
Run the following command to create a group permissions file (UNIX Style /etc/group file)
C:\Program files\OpenSSH\bin> mkgroup -l >> ..\etc\group
where -l indicates local group
-d would add domain groups
Add Authorized users (create unix style /etc/passwd file)
C:\Program files\OpenSSH\bin> mkpasswd -l -u winsockfix >> ..\etc\passwd
where -l indicates a local user
-d would add a domain user
-u indicates the username
We are done with the config now. Reboot the PC or Server now.
Start the OpenSSH Server
C:\>net start opensshd
Clients
To SSH to another system:
ssh <user@servername>
To SCP
scp <localfilename> <user@servername>:<destinationdirectory>
or
scp <user@servername>:<remotefilename> <localfilename>
or
scp <user@servername>:<remotefilename> <user@otherservername>:<destinationdirectory>
To SFTP (Secure ftp):
sftp <user@servername>
For more information and download, click here for the project page on Sourceforge.
Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically each day to your feed reader.
Trackbacks & Pingbacks
Comments
Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>






If you’re simply looking for an ssh client to do outbound connections from Windows platforms, try AbsoluteTelnet. It is a native Windows application with SSH, telnet, and full GUI SFTP support. And yes, it works with Vista! Check my sig for the link.
Brian Pence
Celestial Software