Nested SSH session with Paramiko

后端 未结 5 983
眼角桃花
眼角桃花 2020-11-27 03:42

I\'m rewriting a Bash script I wrote into Python. The crux of that script was

ssh -t first.com \"ssh second.com very_remote_command\"

I\'m

5条回答
  •  再見小時候
    2020-11-27 03:58

    For a ready made solution check out pxssh from the pxpect project. Look at the sshls.py and ssh_tunnel.py examples.

    http://www.noah.org/wiki/Pexpect

提交回复
热议问题