I have openhabian successfully installed with OH 2.5.0.M1 Milestone Build, and I want to use VS Code with remote access.
I can successfully remote as user openhabian via ssh using the command line of the remote (linux) machine into my RPi with:
However, I could not establish a remote connection using the VS Code extension Remote - SSH: Explorer.
I think it failed because you have to generate a public RSA key on the remote host (RPi) and copy it to the remote client, and you have to generate it using the openhab user, not openhabian, at least according to this thread.
So I tried to SSH with openhab and the default password habopen. That password failed, so I went into
and changed the openhab password (using the password change menu selection for remote console).
According to the openhabian installation guide, “All password can be changed from openHABian menu.”
openhabian-config confirmed the password was “successfully changed” but it did not display a user name it was applied to. That is, it did not list openhab. It was just "…password was successfully changed for ". I tried to change user (su) from the remote (openhabian) command line using the changed password, but it did not work.
Then, I tried binding the remote to all interfaces using the changed password:
2019-06-27_15:51:28_CDT [openHABian] Binding the openHAB remote console on all interfaces... $ sed -i s/sshHost = 127.0.0.1/sshHost = 0.0.0.0/g /var/lib/openhab2/etc/org.apache.karaf.shell.cfg $ sed -i s/openhab = .*,/openhab = changed_password,/g /var/lib/openhab2/etc/users.properties $ systemctl restart openhab2.service OK
From the openhabian session, I did successfully SSH into the karaf console using
ssh -p 8101 openhab@localhost
Even though you cannot generate the keys from the karaf console, I was able to access the openhab user.
So is there anything I can do to get access to the openhab user at the command line?