To check if passwordless login (using keys) has been setup simply run the following command:

ssh -o BatchMode=yes <user>@<host> true

For example:

ssh -o BatchMode=yes user@192.168.1.101 true

And examine the exit status of this command. 0 exit status means that passwordless login has been setup. Non-zero exit status means passwordless login has not been setup or some other error.

Actually the option above will just make ssh to not ask for password when connecting, it will try to use ssh keys for connection.

Leave a Reply