JumpSSH
JumpSSH copied to clipboard
how to connect through two or more getwayhost to the targethost and get the sshclient
self.client = SSHClient() gate1_session = SSHSession(self.gate1host, jumpusername, password=jumppassword).open() gate2_session = gate1_session.get_remote_session(self.gate2host, jumpusername, port=port, password=jumppassword) Target_session = gate2_session.get_remote_session(self.hostname, self.username, password=password) self.client = Target_session.ssh_client
I try like this but only get null object