__init__(self,
hostname=None,
port=22,
username=None,
password=None,
passphrase=None,
force_password_auth=False,
key_filename=None,
local_host='localhost',
local_port=22022,
remote_host='localhost',
remote_port=22,
known_hosts=None,
add_to_known_hosts=False,
pkey=None,
look_for_keys=False,
allow_agent=False,
sshproxy_host=None,
sshproxy_port=22,
sshproxy_user=None,
sshproxy_password=None,
sshproxy_force_password_auth=False,
sshproxy_key_filename=None,
sshproxy_pkey=None,
sshproxy_passphrase=None,
sshproxy_look_for_keys=False,
sshproxy_allow_agent=False,
sshproxy_tunnel=None,
ssh_rootdir=os.path.join(_LOCAL_HOME,_X2GO_SSH_ROOTDIR),
session_instance=None,
logger=None,
loglevel=log.loglevel_DEFAULT)
(Constructor)
| source code
|
Initialize an X2GoSSHProxy instance. Use an instance of this class to
tunnel X2Go requests through a proxying SSH server (i.e. to subLANs that
are separated by firewalls or to private IP subLANs that are NATted
behind routers).
- Parameters:
username (str ) - login user name to be used on the SSH proxy host
password (str ) - user's password on the SSH proxy host, with private key
authentication it will be used to unlock the key (if needed)
passphrase ({str}) - a passphrase to use for unlocking a private key in case the
password is already needed for two-factor authentication
key_filename (str ) - name of a SSH private key file
pkey (RSA/DSA key instance ) - a private DSA/RSA key object (as provided by Paramiko/SSH)
force_password_auth (bool ) - enforce password authentication even if a key(file) is present
look_for_keys (bool ) - look for key files with standard names and try those if any can
be found
allow_agent (bool ) - try authentication via a locally available SSH agent
local_host (str ) - bind SSH tunnel to the local_host IP socket address
(default: localhost)
local_port (int ) - IP socket port to bind the SSH tunnel to (default; 22022)
remote_host (str ) - remote endpoint of the SSH proxying/forwarding tunnel (default:
localhost)
remote_port (int ) - remote endpoint's IP socket port for listening SSH daemon
(default: 22)
known_hosts (str ) - full path to a custom known_hosts file
add_to_known_hosts (bool ) - automatically add host keys of unknown SSH hosts to the
known_hosts file
hostname (str ) - alias for local_host
port (int ) - alias for local_port
sshproxy_host (str ) - alias for hostname
sshproxy_port (int ) - alias for post
sshproxy_user (str ) - alias for username
sshproxy_password (str ) - alias for password
sshproxy_passphrase (str ) - alias for passphrase
sshproxy_key_filename (str ) - alias for key_filename
sshproxy_pkey (RSA/DSA key instance (Paramiko)) - alias for pkey
sshproxy_force_password_auth (bool ) - alias for force_password_auth
sshproxy_look_for_keys (bool ) - alias for look_for_keys
sshproxy_allow_agent (bool ) - alias for allow_agent
sshproxy_tunnel (str ) - a string of the format
<local_host>:<local_port>:<remote_host>:<remote_port>
which will override---if used---the options:
local_host , local_port ,
remote_host and remote_port
ssh_rootdir (str ) - local user's SSH base directory (default: ~/.ssh)
session_instance (X2GoSession instance) - the X2GoSession instance that builds up this SSH
proxying tunnel
logger (X2GoLogger instance) - you can pass an X2GoLogger object to
the X2GoSSHProxy constructor
loglevel (int) - if no X2GoLogger object has been
supplied a new one will be constructed with the given loglevel
- Raises:
- Overrides:
object.__init__
|