开发者

Mac OS X Lion and sshpass

I've upgraded from Mac OS X Snow Leopard to Lion. I used several scripts with sshpass but after I upgraded to Lion the following error appears:

Permission denied, please try again.
debug1: read_passphrase开发者_如何学C: can't open /dev/tty: Device not configured
debug1: permanently_drop_suid: 502
ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory

I can only connect with sshpass or type the password manually. No public/private key way. I've reinstalled MacPorts and sshpass.

How can I get ssh-askpass? How can I configure /dev/tty ?

Greets!


I think there is a bug in the sshpass that don't remove DISPLAY. Try to unset DISPLAY before run sshpass. EX:

unset DISPLAY; sshpass -p pass ssh host


it stuck me for a long time, and finally found the hint here:

in simplicity, if one wants to do something like following in mac lion:

sshpass -p pass ssh user@host

he only needs to:

  1. set up a script called pass.sh with following:

    echo pass

  2. set up the environment variable

    export SSH_ASKPASS=~/bin/pass.sh

  3. the ssh could now be done by this:

    sshpass ssh user@host

If you want to get the password from the keychain, you better watch the second answer of this link.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜