x2go.sshproxy module¶
x2go.sshproxy.X2GoSSHProxy
class - providing a forwarding tunnel for connecting to servers behind firewalls.
- class x2go.sshproxy.X2GoSSHProxy(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='/builddir/.ssh', session_instance=None, logger=None, loglevel=56)[source]¶
Bases:
SSHClient
,Thread
X2GoSSHProxy can be used to proxy X2Go connections through a firewall via SSH.
- fw_tunnel = None¶
- get_local_proxy_host()[source]¶
Retrieve the local IP socket address this SSH proxying tunnel is (about to) bind/bound to.
- Returns:
local IP socket address
- Return type:
str
- get_local_proxy_port()[source]¶
Retrieve the local IP socket port this SSH proxying tunnel is (about to) bind/bound to.
- Returns:
local IP socket port
- Return type:
int
- get_remote_host()[source]¶
Retrieve the remote IP socket address at the remote end of the SSH proxying tunnel.
- Returns:
remote IP socket address
- Return type:
str
- get_remote_port()[source]¶
Retrieve the remote IP socket port of the target system’s SSH daemon.
- Returns:
remote SSH port
- Return type:
int
- run()[source]¶
Start the SSH proxying tunnel…
- Raises:
X2GoSSHProxyException – if the SSH proxy could not retrieve an SSH transport for proxying a X2Go server-client connection