I’m still getting
quarku@openhabian:~$ sudo /usr/bin/ssh -p 8101 -i /home/openhabian/karaf_keys/openhab.id_rsa openhab@localhost bundle:restart 224
Password authentication
Password:
Password authentication
Password:
Password authentication
Password:
openhab@localhost's password:
Permission denied, please try again.
openhab@localhost's password:
Permission denied, please try again.
openhab@localhost's password:
openhab@localhost: Permission denied (keyboard-interactive,password,publickey).
quarku@openhabian:~$ su openhabian
Password:
openhabian@openhabian:/home/quarku$ sudo /usr/bin/ssh -p 8101 -i /home/openhabian/karaf_keys/openhab.id_rsa openhab@localhost bundle:restart 224
[sudo] password for openhabian:
openhabian is not in the sudoers file. This incident will be reported.
openhabian@openhabian:/home/quarku$
I don’t know what is going on I’ve tried to put rsa key + public key to /var/lib/openhab/.ssh/
at the first place and change the permissions before first ssh it with:
sudo chown openhab:openhab -R /var/lib/openhab/.ssh
Then I’ve moved both keys to /home/openhabian/karaf_keys/ dir and still it just doesn’t work.
I was asked by ubuntu to add localhost to list of known hosts - that means imho that the permissions of home folder are ok. Correct me if I’m wrong.
/home/openhabian/karaf_keys/know_hosts:
|1|C6yJ0UN<cut security reasons>+9nDpsdQBro= ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA<cut security reasons>ei1V94bCz7aAtWo4XwFmEtqlvRz>
/var/lib/openhab/etc/keys_properties:
#karaf=AAAAB3NzaC1kc3MAAACBA<cut security reasons>HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3z>,_g_:admingroup
openhab=AAAAB3NzaC1yc2EAAAADAQABA<cut security reasons>ei1V94bCz7aAtWo4XwFmEtqlvRz>,_g_:admingroup
_g_\:admingroup = group,admin,manager,viewer,systembundles,ssh
Every time there is no error but he ask me to type in karaf console password.
Normally I’m using ‘quarku:x:1000:1000:quarku:/home/quarku:/bin/bash’ this login as main console login.
but as far as I know karaf is a separate system
less /etc/passwd
return a list of users where I can find:
- openhab:x:114:120:openhab runtime user,:/var/lib/openhab:/bin/false
- openhabian:x:1001:120:openHABian,openHAB admin user:/home/openhabian:/bin/bash
In Karaf:
jaas:realm-list
return on position 6;
6 │ openhab │ org.openhab.core.auth.jaas.internal.ManagedUserLoginModule
And also
sudo visudo
return
# User privilege specification
root ALL=(ALL:ALL) ALL
openhab ALL = NOPASSWD: /bin/rm, /bin/chmod, /bin/chown, /usr/bin/amixer, /usr/bin/l2ping, /usr/bin/ssh, /sbin/reboot, /sbin/iptables, /sbin/modprobe
I’m lost maybe someone can help?
@NCO @rlkoshak