I would like to know how to to jump from one remote server to another remote server using paramiko. I want to ssh from my local pc to remote-A then from remote-A to remote-B and from remote- B to remote-C.
import paramiko
def connect(ip, usr, psw):
client = paramiko.SSHClient()
client.load_host_keys('/home/dgomez/.ssh/known_hosts')
client.connect(ip, username=usr, password=psw)
return client
host1 = connect('192.168.1.2', 'username', 'password')
# Here I'm connect to remote-A
Now I would to know how can I connect from Remote-A to Remote-B.