def paramiko_tunnel(lport, rport, server, remoteip='127.0.0.1', keyfile=None, password=None, timeout=60):
 if (paramiko is None):
  raise ImportError('Paramiko not available')
 if (password is None):
  if (not _try_passwordless_paramiko(server, keyfile)):
   password = getpass(("%s's password: " % server))
 p = Process(target=_paramiko_tunnel, args=(lport, rport, server, remoteip), kwargs=dict(keyfile=keyfile, password=password))
 p.daemon = True
 p.start()
 return p

def paramiko_tunnel ( lport , rport , server , remoteip = '127.0.0.1' , keyfile = None , password = None , timeout = 60 ) : if ( paramiko is None ) : raise ImportError ( 'Paramiko not available' ) if ( password is None ) : if ( not _try_passwordless_paramiko ( server , keyfile ) ) : password = getpass ( ( "%s's password: " % server ) ) p = Process ( target = _paramiko_tunnel , args = ( lport , rport , server , remoteip ) , kwargs = dict ( keyfile = keyfile , password = password ) ) p . daemon = True p . start ( ) return p
launch a tunner with paramiko in a subprocess .