python Paramiko Python - Utilizando JUMP HOST
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python Paramiko Python - Utilizando JUMP HOST相关的知识,希望对你有一定的参考价值。
vm = paramiko.SSHClient()
vm.set_missing_host_key_policy(paramiko.AutoAddPolicy())
vm.connect(IP_GATEWAY, username=USERNAME, password=PASSWORD, auth_timeout=WAIT_TIME)
vmtransport = vm.get_transport()
vmchannel = vmtransport.open_channel("direct-tcpip", (host, 22), (IP_GATEWAY, 22))
jhost = paramiko.SSHClient()
jhost.set_missing_host_key_policy(paramiko.AutoAddPolicy())
jhost.connect(host, username=USERNAME, password=PASSWORD, sock=vmchannel, auth_timeout=WAIT_TIME)
# jhost.execute(...)
jhost.close()
以上是关于python Paramiko Python - Utilizando JUMP HOST的主要内容,如果未能解决你的问题,请参考以下文章
python paramiko 模块
Python模块 - Paramiko
python中的paramiko模块
Python33 paramiko模块
python小白之paramiko
mac python3 安装paramiko