Mar 16, 2012

Installing And Configuring SSH server on Windows

We will be making use of Cygwin utilities to configure and run ssh as service on windows machine. Installing Cygwin on a windows machine is pretty straight forward. Download the latest Cygwin installation setup.exe from the Cygwin site and follow the below instructions.

1. Installing Cygwin
Step 1. Double click setup.exe


Step 2. Choose the download source

Step 3. Select the root directory of the Cygwin. This directory is synonymous to / in linux

Step 4. Select the directory where you want to keep the installation files. You can save this directory and use at a later point to install Cygwin on any windows machine using this directory.

Click 'OK' if prompted to create the directory if it does not exists

Step 5. Select the type of connection you are using to connect to internet.

Step 6. Choose a download site.

Step 7. Clicking next opens up the 'Select Packages' screen.

Step 8. Select the Open SSH server and client programs from the 'Select Packages' screen.

Step 9. Click next to start the installation.

This will install the following utilities in your Cygwin's /usr/bin directory
ssh-add.exe
ssh-agent.exe
ssh-host-config
ssh-keygen.exe
ssh-keyscan.exe
ssh-user-config
ssh.exe

2. Configuring ssh as Windows service

Run ssh-host-config utility to configure sshd server on windows. Select 'no' when prompted for 'Should privilege separation be used? (yes/no)'. Select 'yes' when prompted for 'Do you want to install sshd as service?'. Choose default options for other options.
The above will install CYGWIN sshd service on Windows. To start the service execute
net start sshd

3. Connecting using Cygwin ssh client (ssh.exe)
ssh.exe user@ssh-server

4. Connecting through putty

Add the server's host key to registry. This will add an entry into the ~/.ssh/known_hosts file

Login using windows user and password

No comments :

Post a Comment