Until now I ssh’d to my user on my Raspberry Pi and then executed the following command to configure openHAB.
sudo -u openhab mc /etc/openhab2 /var/lib/openhab2/
This requires me to type in my password.
Now I was wondering if I could ssh directly to the openhab
user with my ssh-key.
The login seems to work, but I imidiately get logt out.
Aug 4 23:05:18 openhab sshd[19253]: Accepted publickey for openhab from 192.168.1.2 port 63795 ssh2: RSA 54:5d:e7:d7
:2a:ac:d8:a1:32:cf:c0:2a:e6:38:9d:4b
Aug 4 23:05:18 openhab sshd[19253]: pam_unix(sshd:session): session opened for user openhab by (uid=0)
Aug 4 23:05:18 openhab systemd-logind[383]: New session c229 of user openhab.
Aug 4 23:05:18 openhab systemd: pam_unix(systemd-user:session): session opened for user openhab by (uid=0)
Aug 4 23:05:18 openhab sshd[19258]: Received disconnect from 192.168.1.2: 11: disconnected by user
Aug 4 23:05:18 openhab sshd[19253]: pam_unix(sshd:session): session closed for user openhab
Aug 4 23:05:18 openhab systemd-logind[383]: Removed session c229.
Aug 4 23:05:18 openhab systemd: pam_unix(systemd-user:session): session closed for user openhab
Why?
btw: I am not using opanHabian, but installed openHAB manually via apt on my Raspi.