Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MyLocalMachine ---> MiddleMachine --(netcat)--> AnotherMachine
- ('localhost') ('1.1.1.1') ('2.2.2.2')
- cli = paramiko.SSHClient()
- cli.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- proxy = paramiko.ProxyCommand('ssh user@1.1.1.1 nc 2.2.2.2 22')
- cli.connect(hostname='2.2.2.2', username='user', password='pass', sock=proxy)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement