[Twisted-Python] twisted.conch.ssh.session.SSHSession.request_subsystem

glyph at divmod.com glyph at divmod.com
Mon Dec 22 19:26:38 MST 2008


On 22 Dec, 07:10 pm, tzury.by at gmail.com wrote:
>Glyph, thanks for your attention and time. I am afraid I was not clear
>wit hmy question so please allow me to elaborate.

>>The way you control which paths a user can access in this scenario is 
>>by
>>setting the filesystem permissions on those directories.  Sorry, but 
>>Twisted
>>cannot magically change your UNIX filesystem so that arbitrary 
>>commands see
>>a different view of it.
>
>I don't want to create a UNIX user per client. I want to design the
>system in a way that all the clients will access using one single
>'public' account.

The key question is: do you just want an sftp server?  Or are you trying 
to write a real SSH server, that can run commands?
>e.g. bzr branch sftp://user@server:port/allowed_path_only

So, not "bzr+ssh://"?
>when running the command mentioned above (bzr branch
>sftp://user@server:port/allowed_path_only)  only
>SSHSession.request_subsystem is called (neither request_shell nor
>request_exec) - that's why I brought it up.

I believe "bzr+ssh://" will run request_exec instead.  (It will try to 
run 'bzr'.)




More information about the Twisted-Python mailing list