Mac OS X Lion 和 sshpass
我已从 Mac OS X Snow Leopard 升级到 Lion。我在 sshpass
中使用了多个脚本,但在升级到 Lion 后,出现以下错误:
Permission denied, please try again. debug1: read_passphrase: 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
我只能使用 sshpass
连接或手动输入密码。没有公钥/私钥方式。我已经重新安装了 MacPorts 和 sshpass。
我如何获得 ssh-askpass?如何配置 /dev/tty ?
问候!
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: 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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为 sshpass 中存在一个无法删除 DISPLAY 的错误。在运行 sshpass 之前尝试取消设置 DISPLAY。前任:
I think there is a bug in the sshpass that don't remove DISPLAY. Try to unset DISPLAY before run sshpass. EX:
它困扰了我很长时间,终于找到了提示此处:
简单来说,如果有人想在 mac lion 中执行以下操作:
他只需要:
设置一个名为pass.sh的脚本,内容如下:
<块引用>
回声传递
设置环境变量
<块引用>
导出 SSH_ASKPASS=~/bin/pass.sh
现在可以通过以下方式完成 ssh:
<块引用>
sshpass ssh 用户@主机
如果你想从钥匙串中获取密码,你最好看这个的第二个答案 链接。
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:
he only needs to:
set up a script called pass.sh with following:
set up the environment variable
the ssh could now be done by this:
If you want to get the password from the keychain, you better watch the second answer of this link.