Hello guys,
I am currently working on an automation script that connects via SSH (Username & Password / no ssh key) to a server and reads from a database.
When I run the script locally on my PC, it works fine. I also ran it directly on the Dataminer server and it works there too. I receive all data of the extern database.
However, when I run it through the automation script solution, I always get a “host key not verified” error. I execute the automation script with a low code app.
Even if I open a terminal on the Dataminer server, I can connect via SSH and interact with the remote server without any problems. I also tried setting trust server to true in my code, but it still doesn’t work.
Does anyone have any ideas what could be causing this?
Thanks
Hi Ömer, even if I'm not sure what you are using in your script (assumeing openSSH) please make sure you're using the same user for the automation script that you used directly on the server. With a local connection, the key is stored in the `.ssh/known_hosts` file in the settings of the locally used user. If you're using different users in your LCA, you can try impersonating a different user. You can find an example of this in the Sagemcom SANA driver.
As an alternative you can try bypass the host key checking: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null