Paramiko and Pseudo-tty Allocation

前端 未结 4 1901
暖寄归人
暖寄归人 2020-11-28 11:54

I\'m trying to use Paramiko to connect to a remote host and execute a number of text file substitutions.

i, o, e = client.exec_command(\"perl -p -i -e \'s/         


        
4条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-28 12:30

    Actually it's quite simple. Just:

    stdin, stdout, stderr = client.exec_command(command,  get_pty=True)
    

提交回复
热议问题