Running an SSH server in Windows
From FreeBSDwiki
(Difference between revisions)
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | Why? So you can ssh into your Windows machines as well! | + | Why? So you can ssh into your Windows machines as well! Or so you can combine it with [[Tunneling_over_SSH_from_Windows]]. |
− | # Get Cygwin | + | == FreeSSHD == |
− | # Install it and choose the OpenSSH package (OpenSSL will also be chosen for you, as a dependency). | + | |
+ | There is a free-as-in-beer (though not open source) single-install SSH server for Windows platforms called [[http://www.freesshd.com FreeSSHD]]. FreeSSHD uses the proprietary "wodSSH" library as its engine. | ||
+ | |||
+ | == OpenSSH under Cygwin == | ||
+ | |||
+ | # Get Cygwin [[http://cygwin.com here]]. | ||
+ | # Install it and choose the OpenSSH package (OpenSSL will also be chosen for you, as a dependency) and install that. | ||
# Install the <I>cygrunsrv</I> package from the Admin category. | # Install the <I>cygrunsrv</I> package from the Admin category. | ||
# Right-click "My Computer", select properties, go to Advanced tab, select "Environment Variables". Find the variable for "Path" and double-click it. Add "C:\cygwin\bin" to the path, after whatever else is there. Click on "New" and add a new variable named CYGWIN with the value set to <I>ntsec tty</I>. | # Right-click "My Computer", select properties, go to Advanced tab, select "Environment Variables". Find the variable for "Path" and double-click it. Add "C:\cygwin\bin" to the path, after whatever else is there. Click on "New" and add a new variable named CYGWIN with the value set to <I>ntsec tty</I>. | ||
Line 8: | Line 14: | ||
# start the service from the cygwin bash shell by running <B>cygrunsrv -S sshd</B>. | # start the service from the cygwin bash shell by running <B>cygrunsrv -S sshd</B>. | ||
# You should be able to test it by ssh'ing to <B>localhost</B>. If that works, try it over your LAN. If that doesn't work, check your Windows firewall and allow connections to TCP port 22. | # You should be able to test it by ssh'ing to <B>localhost</B>. If that works, try it over your LAN. If that doesn't work, check your Windows firewall and allow connections to TCP port 22. | ||
+ | |||
+ | ==See also== | ||
+ | [[ssh]] | ||
+ | |||
+ | [[sshd]] | ||
+ | |||
+ | [[Tunneling_over_SSH_from_Windows]] | ||
[[Category:Cygwin]] | [[Category:Cygwin]] | ||
+ | [[Category:Windows Equivalents]] |
Latest revision as of 11:34, 15 December 2007
Why? So you can ssh into your Windows machines as well! Or so you can combine it with Tunneling_over_SSH_from_Windows.
[edit] FreeSSHD
There is a free-as-in-beer (though not open source) single-install SSH server for Windows platforms called [FreeSSHD]. FreeSSHD uses the proprietary "wodSSH" library as its engine.
[edit] OpenSSH under Cygwin
- Get Cygwin [here].
- Install it and choose the OpenSSH package (OpenSSL will also be chosen for you, as a dependency) and install that.
- Install the cygrunsrv package from the Admin category.
- Right-click "My Computer", select properties, go to Advanced tab, select "Environment Variables". Find the variable for "Path" and double-click it. Add "C:\cygwin\bin" to the path, after whatever else is there. Click on "New" and add a new variable named CYGWIN with the value set to ntsec tty.
- Open a cygwin bash shell and run ssh-host-config -y to set up ssh keys, your sshd config file and to set sshd to run as a Windows service. It'll ask for the value of the CYGWIN variable, put in the same thing as the var above: ntsec tty.
- start the service from the cygwin bash shell by running cygrunsrv -S sshd.
- You should be able to test it by ssh'ing to localhost. If that works, try it over your LAN. If that doesn't work, check your Windows firewall and allow connections to TCP port 22.