Deny interactive ssh requests

I have an ssh script that uses the local key to enter the remote host - there is nothing interesting. The key is with a password, and I usually add it to the agent to avoid the request.

Sometimes I run a program before starting the agent, and it will be waiting for the unlock phrase. In such cases, and not online, I want the team to simply fail.

Does anyone know if there is an option for this?

+3
source share
1 answer

Of course.

ssh REMOTE_HOST -o "BatchMode yes"
+5
source

Source: https://habr.com/ru/post/1778820/


All Articles