10000 GitHub - nick-o/tunnels: ssh tunnels with paramiko
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

nick-o/tunnels

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tunnels

ssh tunnels with paramiko

install dependencies

pip install -r requirements.txt

as a psexec proxy

import tunnel

bastionhost = 'my.bastion'
pkey = open('~/.ssh/id_rsa', 'r').read()

client = tunnel.get_sshclient(bastionhost, private_key=pkey)
tunnel = tunnel.connect('windows.server', 445, client)

# what port was my tunnel assigned? (defaults to localhost:P)
print tunnel.address
... ('127.0.0.1', 59277)

tunnel.serve_forever()

# not yet implemented
c2 = tunnel.get_psexecclient('localhost', 59277)
c2.remote_execute('echo hello')

as an ssh proxy

bastionhost = 'my.bastion'
pkey = open('~/.ssh/id_rsa', 'r').read()

client = tunnel.get_sshclient(bastionhost, private_key=pkey)
tunnel = tunnel.connect('linux.server', 22, client)

# what port was my tunnel assigned? (defaults to localhost:P)
print tunnel.address
... ('127.0.0.1', 59268)
tunnel.serve_forever()

c2 = tunnel.get_sshclient('localhost', 59268)
c2.remote_execute('echo hello')

About

ssh tunnels with paramiko

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
0