2

I'm trying to use sshpass to login automatically, however, it seems to have problem with /dev/tty

echo password | ./sshpass ssh root@xxxx
...
debug1: read_passphrase: can't open /dev/tty: No such device or address
...
Permission denied (publickey,gssapi-with-mic,password).

Any ideas? I can login directly without sshpass, so it's a tty problem.

daisy
  • 53,527
  • 78
  • 236
  • 383

1 Answers1

3

sshpass is used different way:

./sshpass -p password ssh root@xxxx

as explained in the manual page synopsis:

sshpass [-ffilename|-dnum|-ppassword|-e] [options] command arguments
Jakuje
  • 20,974
  • 7
  • 51
  • 70