尝试运行命令ssh user@ip 'command'
时,我一直收到此错误:can't get tty settingscan't set orig mode
。我试过谷歌搜索并在这里搜索,但没有发现任何涉及此消息的内容。我正在尝试使用Golang自动连接到思科无线接入点(2800型号)以运行命令然后退出,但每次都会弹出此消息。我可以使用ssh user@ap_ip
正常登录,但是使用简写ssh user@ap_ip 'command'
或在Golang中尝试等效操作会给出上面的错误消息。任何人都知道发生了什么?
答案 0 :(得分:0)
-t
选项,即ssh -t user@ip command
。来自the documentation:
-t Force pseudo-terminal allocation. This can be used to execute
arbitrary screen-based programs on a remote machine, which can be
very useful, e.g. when implementing menu services. Multiple -t
options force tty allocation, even if ssh has no local tty.