[SOLVED] Host key verification failed

Hi,

Why I get this error when I send a Command, if I can login properly automatically without password from terminal?

2018-08-01 21:54:48.560 [INFO ] [ipse.smarthome.model.script.ExecTest] - Host key verification failed.
rule "Plex reboot"
when Item PLEX changed to ON
then
val results = executeCommandLine("ssh@@pi@192.168.2.124@@sudo@@shutdown@@-r@@no$
logInfo("ExecTest", results)
Thread::sleep(3000)
PLEX.sendCommand(OFF)

end
[22:00:15] openhabian@openhabianpi:/var/lib/openhab2/.ssh$ ls -la
total 20
drwxrwx---+  2 openhab openhabian 4096 Aug  1 21:51 .
drwxrwxr-x+ 10 openhab openhabian 4096 Jul 10 21:25 ..
-rw-------   1 openhab openhab       1 Aug  1 20:41 authorized_keys
-rw-------   1 openhab openhab    1675 Aug  1 21:49 id_rsa
-rw-------   1 openhab openhab     405 Aug  1 21:49 id_rsa.pub
-rw-------   1 openhab openhab       0 Aug  1 19:10 known_hosts

Thank you.

Hi @grhosso
did you generated an SSH key pair already? if not, you should generate one with the user ‘openhab’ and copy the public key to the remote system:

sudo -u openhab ssh-keygen -t rsa -b 2048
sudo -u openhab ssh-copy-id root@<IP_of_target_machine>
2 Likes