SSH to remote is always asking to add the key even it's known

Hello,
following situation:

root@OpenWrt:~# ssh -i /usr/keys/remote.key root@remote
Connection to root@remote is done and key get added to known_hosts

Doing the same in a script located in /etc/hotplug.d/ is asking me to add the key because it's not known.
Both are executed by root, check with a simple whoami in the script.

Any idea why this get asked in the script executed by OpenWRT (executed as root)?

You have to set $HOME for dbclient as it does not permit overriding it. For OpenSSh read manual.

Ok, did another way. Setup OpenSSH instead of using Dropbear.
Then all works fine.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.