Monday, July 8, 2013

How to install ssh in Cygwin

As I said in this article, Cygwin allows to access a Windows machine via ssh. This can be very useful to run commands when programming for both Windows and Linux, and in other cases I haven't thought of yet.


  • Cygwin installed in a Windows machine. Cygwin must have the ssh packages selected. To know how to do it, check this.
  • PuTTY. This will be used to check if everything is working as expected. Get PuTTY here


1. Once you have Cygwin installed with the ssh packages, run the Cygwin console as Administrator.
2. In the console, enter:

 3. For the question "Should privilege separation be used?", enter Yes
 4. For the question "new local account 'sshd'?", enter Yes
5. For the question "Do you want to install sshd as a service?", enter Yes. For "Enter the value of CYGWIN for the daemon:", enter ntsec.
6. For the question "Do you want to use a different name?", enter No.
7. For the question "Create new privileged user account 'cyg_server'?", enter Yes.
8. Enter a password twice:
9. That's it! Now you have to start the service by typing:
net start sshd 
10. Let's see if this is working. Open PuTTY. Now, enter the IP number of the computer with Cygwin in the Host Name field (you can do this within the same computer) and press Open:
11. Press Yes in the Security Alert.
12. Now, enter the user of the computer with Cygwin and the password you set. If you see something like the picture, you're done. You are accessing a Windows machine through ssh!

0 comentarios:

Post a Comment