Running an open ssh server (SSHD) is quite easy. And it allows you to run Linux style backups on a windows server (as I’ve previously posted about).
To set up SSHD you need to:
- run SSHD config setup
- make config changes for your environment
- install SSHD as a service
To run SSHD Config Setup, open cygwin prompt (and run it as administrator if on server 2008 or windows7) and run:
$ ssh-host-config -y
(Note, the -y option answers yes automatically to all yes/no prompts)
The script will ask you for a password for the cyg_server user account it will create to run sshd as a windows service
The sshd config file is now located in /etc/ssh_config. You can make config changes to secure your SSHD server. To secure the server I would normally change the port sshd listense on to something abnormal, and turn off password authentication, allowing only RSA2 key based authentication available.
Finally you need to run the service:
cygrunsrv -S sshd
Finally you need to add your public key to the user on the server you want to connect as in the users ~/.ssh/authorized_keys file if you disabled password authenticaiton in the /etc/ssh_config file.
Dont forget to open the configured ssh port on the firewall, otherwise, your connection will timeout.
After that you should be able to successfully connect to the server using open ssh client on linux or windows.