After we've installed cygwin and openssh-server on our host machine we can configure automatic ssh connection with private and public keys for fast connection without passwords.
1. Open cygwin shell.
2. Run commands:
mkdir ~/.ssh > ~/.ssh/authorized_keys
3. Edit /etc/sshd_config: uncomment and change PasswordAuthentication to No.
1. For generating keys we will use putty. On your server machine download and unpack full putty package.
2. Run PUTTYGEN.EXE file. Click button Generate and make some mouse moves for random effect. If you want to connect to host machine without password, do not fill fields "Key passphrase".
3. Push button "Save private key" and set location and name for it.
4. Copy public key from field "Public key for pasting into Open SSH authorized_keys file"
5. On your host machine paste public key into created earlier file ~/.ssh/authorized_keys and save it.
6. On your server machine run PAGEANT.EXE and add file with private key. For convinience you can add this programm to autorun folder.
7. Now connect to your host machine via ssh:
$ ssh firstname.lastname@example.org host-user@host-machine ~ $
As you can see, you don't need to write password every time for connecting to your host machine.