It seems like I've installed OpenSSH on a thousand different Windows machines, and each time I always struggle to figure out what to do. So I decided (mostly for my own sake so that I have something to look back at) that I'd jot down the steps I took.
-
To start off with, we have to download the OpenSSH client. At the time of writing, this is a good bet:
OpenSSH Download from Softonic. After this,
1) Modify /etc/hosts.allow
such that you either allow incoming connections from all IP addresses or the range of your choice. Then, of course, we have to2) Go into Windows Security Center and open up Port 22
This amounts to Start->Control Panel->Windows Firewall, followed by a click on the "Exceptions" tab. We have to add port 22, with TCP. Next, if you don't have it,3) Create the /etc/password file
The rest of the instructions are spelled out pretty well in the OpenSSH readme.txt file, but I'll list them anyway.4) mkgroup -l >> /etc/group 5) mkgroup -d >> /etc/group
And finally,6) mkpasswd -l >> /etc/group 7) mkpasswd -d >> /etc/group
Then we should be ready to start the SSH Daemon.8) ssh-host-config -y 9) cygrunsrv.exe -S sshd
These last two instructions assume you're in C:\Program Files\OpenSSH\bin. Once this has been done, we should be ready to go. I can't swear by the order of all this, but this should be what's needed to get going.