我正在使用一个特定于站点的身份验证脚本,该脚本为无密码登录颁发 24 小时证书。如果证书已过期,我想要做的是装配我的~/.ssh/config
所以触发脚本:ssh
Match originalhost remotehost.site exec "test $(file.age ~/.ssh/certificate) -ge 86400" exec ~/bin/authentication_script
这几乎可以工作 - 它测试最新证书文件的年龄,并调用authentication_script
它是否已过期。问题是该脚本使用 TTYread
操作来获取密码输入,并给出以下错误:
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
authentication_script: The sshproxy server said: Authentication failed. Failed login: myname:
authentication_script: This usually means you did not enter the correct password or OTP:
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
authentication_script: The sshproxy server said: Authentication failed. Failed login: myname:
authentication_script: This usually means you did not enter the correct password or OTP:
stty: 'standard input': Inappropriate ioctl for device
当我从常规登录会话在命令行上运行脚本时,不会发生这种情况。是否有某种模式可以翻转以使其正常工作?