ssh_askpass: exec(/usr/libexec/openssh/ssh-askpass): No such file or directory => misleading message

It is absolutely misleading messages when we see "ssh_askpass: exec(/usr/libexec/openssh/ssh-askpass): No such file or directory". I found it is because wrong file permission with /home/<user>/.ssh/authorized_keys.

Problem:
# for i in `cat sync.users|grep -P "p$"`; do echo $i; su $i -c "ssh $my_remote_host exit; echo ‘ok’;" ; done;
user1
ssh_askpass: exec(/usr/libexec/openssh/ssh-askpass): No such file or directory
Permission denied, please try again.
ssh_askpass: exec(/usr/libexec/openssh/ssh-askpass): No such file or directory
Permission denied, please try again.

Solution:
Set up file permissions properly in both local and remote servers
chmod 700 /home/<user>/.ssh
chmod 644 /home/<user>/.ssh/authorized_keys

Error messages doesn’t always refers to correct direction, be careful.

Advertisements

About Pang

Oracle DBA working in database, fusion middleware and identity management and cloud.
This entry was posted in Computers and Internet. Bookmark the permalink.

2 Responses to ssh_askpass: exec(/usr/libexec/openssh/ssh-askpass): No such file or directory => misleading message

  1. John Long says:

    Alternatively, install openssh-askpass (package name in Fedora, may differ per distro) to be prompted for a password.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s