sshpass 碰到个古怪的问题~

2016-02-25 09:46:55 +08:00
 foxni
之前一直用的 expect 写的 ssh 登录脚本,不过相对而言还是 sshpass 更简单易用。
废话少说,直接问题:
在 HP-UX 上编译 sshpass 成功,但是在使用的时候 ssh 到其他主机提示: Permission denied 。
命令: sshpass -p "*****" ssh -o StrictHostKeyChecking=no username@hostip
打开 verbose 发现如下报错:
debug1: Next authentication method: password
debug1: read_passphrase: can't open /dev/tty: No such device or address
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Permission denied, please try again.
debug1: read_passphrase: can't open /dev/tty: No such device or address
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Permission denied, please try again.
debug1: read_passphrase: can't open /dev/tty: No such device or address
检查了下客户端系统 /dev/tty 的权限应该没有问题,而其他系统(SUSE)下这个命令能正常登录。所以问题应该出在客户端系统头上,但是找了半天也没找到原因。各位能不能帮着想想招?
4099 次点击
所在节点    问与答
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/258961

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX