V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
foxni
V2EX  ›  问与答

sshpass 碰到个古怪的问题~

  •  
  •   foxni · Feb 25, 2016 · 4612 views
    This topic created in 3726 days ago, the information mentioned may be changed or developed.
    之前一直用的 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)下这个命令能正常登录。所以问题应该出在客户端系统头上,但是找了半天也没找到原因。各位能不能帮着想想招?
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2978 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 15:10 · PVG 23:10 · LAX 08:10 · JFK 11:10
    ♥ Do have faith in what you're doing.