Package x2go :: Module sftpserver
[frames] | no frames]

Module sftpserver

source code

For sharing local folders via sFTP/sshfs Python X2Go implements its own sFTP server (as end point of reverse forwarding tunnel requests). Thus, Python X2Go does not need a locally installed SSH daemon on the client side machine.

The Python X2Go sFTP server code was originally written by Richard Murri, for further information see his website: http://www.richardmurri.com

Classes
  X2GoRevFwTunnelToSFTP
A reverse fowarding tunnel with an sFTP server at its endpoint.
  X2GoRevFwSFTPChannelThread
A clone of rforward.X2GoRevFwChannelThread.
Functions
 
x2go_rev_forward_sftpchannel_handler(chan=None, auth_key=None, logger=None)
Handle incoming sFTP channels that got setup by an X2GoRevFwTunnelToSFTP instance.
source code
Variables
  __NAME__ = 'x2gosftpserver-pylib'
Function Details

x2go_rev_forward_sftpchannel_handler(chan=None, auth_key=None, logger=None)

source code 

Handle incoming sFTP channels that got setup by an X2GoRevFwTunnelToSFTP instance.

The channel (and the corresponding connections) close either ...

  • ... if the connecting application closes the connection and thus, drops the sFTP channel, or
  • ... if the X2GoRevFwTunnelToSFTP parent thread gets paused. The call of X2GoRevFwTunnelToSFTP.pause() on the instance can be used to shut down all incoming tunneled SSH connections associated to this X2GoRevFwTunnelToSFTP instance from within a Python X2Go application.
Parameters:
  • chan (paramiko.Channel instance) - an incoming sFTP channel
  • auth_key (paramiko.RSAKey instance) - Paramiko/SSH RSAkey object that has to be authenticated against by the remote sFTP client
  • logger (X2GoLogger instance) - you must pass an X2GoLogger object to this handler method