Hello All! I login in and out many times per day since I am in the process of building my openhab2 system. I wanted to post a shortcut that I did. This shortcut will allow you to avoid entering the password and auto login. I used cygwin on windows as my terminal, but this will work if you are using Linux or another terminal server. See note below if using Putty on windows.
If on Windows, install cygwin with SSH
Login to the opehab server to get the initial known host file setup using “ssh openhabuser@openhabserver”, then logout back to local shell
execute “ssh-keygen -t rsa” on localhost to generate a key pair. Just click enter taking default settings and set no passphrase.
Copy the newly generated keys to the openhab server using the command “ssh-copy-id -i ~/.ssh/id_rsa.pub openhabuser@openhabserver”
Try to login using “ssh openhabuser@openhabserver” you should auto login with no password.
Once logged in execute “chmod 700 .ssh; chmod 640 .ssh/authorized_keys” from the command line to set the proper file permissions"
****Note:**If you are using Putty on windows this can be done using PuTTYgen, however this tutorial does not fully cover that setup process. Please see: https://www.ssh.com/ssh/putty/windows/puttygen#sec-Running-PuTTYgen