我正在Python中运行ssh,而不使用像Paramiko这样的外部库。我有这样做的理由,而不是通过外部图书馆。“伪终端将不会被分配,因为stdin不是终端”当通过python运行ssh而没有paramiko
基本上是做这个的时候我做subprocess.Popen("ssh -t bla -- command")
我得到以下信息:
Pseudo-terminal will not be allocated because stdin is not a terminal.
我与-t
运行它的原因是我想要的远程命令时,我杀了我的Python终止脚本。
当我试着使用-t -t
(给力了),我得到以下信息:
tcgetattr: Inappropriate ioctl for device
有没有一种方法,我可以通过用Python -t
运行我的ssh命令?
如果你可以与远程设置的sshd胡闹,这应有助于:http://superuser.com/questions/396994/setting-ssh-to-terminate-remote-process-upon-disconnection – 2012-05-22 02:48:08