stdout と stderr の出力を結合しようとしています。私の考えでは、これは Channel オブジェクトの set_combine_stderr() で行うことができます。
これは私がやっていることです:
SSH = paramiko.SSHClient()
#I connect and everything OK, then:
chan = ssh.invoke_shell()
chan.set_combine_stderr(True)
chan.exec_command('python2.6 subir.py')
resultado = chan.makefile('rb', -1.)
ただし、結果を保存しようとすると、次のエラーが発生します (上記の最後の行、 chan.makefile() )。
エラー: チャネルが閉じられました。
どんな助けでも大歓迎です