23 |
import getpass |
import getpass |
24 |
import paramiko |
import paramiko |
25 |
from SSHproxy.client import start_client |
from SSHproxy.client import start_client |
26 |
from SSHproxy import Version |
from SSHproxy import Version, SSHproxyError |
27 |
from optparse import OptionParser |
from optparse import OptionParser |
28 |
|
|
29 |
usage = """ |
usage = """ |
73 |
|
|
74 |
password = getpass.getpass("Password: ") |
password = getpass.getpass("Password: ") |
75 |
|
|
76 |
start_client(username=username, |
try: |
77 |
password=password, |
start_client(username=username, |
78 |
proxy=proxy, |
password=password, |
79 |
port=port, |
proxy=proxy, |
80 |
ruser=ruser, |
port=port, |
81 |
hostname=hostname, |
ruser=ruser, |
82 |
rport=rport) |
hostname=hostname, |
83 |
|
rport=rport) |
84 |
|
except SSHproxyError, msg: |
85 |
|
print msg |
86 |
|
except AttributeError: |
87 |
|
print 'Unable to connect to proxy' |