Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

(Moved from StackOverflow:

How is it possible for tools like 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

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


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.