Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

(Moved from StackOverflow: http://stackoverflow.com/questions/4589725/sftp-via-shell-how-it-is-possible)

How is it possible for tools like http://mysecureshell.sourceforge.net/ to provide SFTP access by merely specifying them as shell by typing:

usermod -s /bin/MySecureShell myuser

?

I'm on Debian Lenny, with default sshd/OpenSSH.

Is this e.g. a feature of SSH protocol that allows user shell to handle sftp commands? I can't wrap my head around this because usually OpenSSH needs sftp-server module (or the internal one in newer versions) - and this makes me think that sftp commands don't even hit the shell and are handled earlier or by different code path..

share|improve this question

1 Answer 1

If you look at: /etc/ssh/sshd_config

You will see the line:

Subsystem sftp /usr/lib/openssh/sftp-server

I believe what this does is links any clients connecting on SFTP (By passing the protocal as SFTP rather than SSH) to login using SSH, then pass any requests to this subsystem to handle the actual request

share|improve this answer
    
That's why I wrote that I couldn't wrap my head around this :-) That sftp subsystem doesn't seem to be used for users that have /bin/MySecureShell defined as their shell. –  Tomasz Zieliński Jan 4 '11 at 14:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.