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

I have a server in which users can't login via ssh but can upload files by sftp. This server has an ldap database of users and ssh and sftp are configured with the ldap, so none of the ldap users can't login via ssh but can upload files via sftp.

But now I want to do another thing: I want to allow one specified ldap user to log in via ssh.

Is that possible? Is there any chance of having this working?

I tried with AllowUsers in sshd_config but it seems not working.

Thanks a lot!

share|improve this question
Can you tell us a bit more about how your ssh server checks users against LDAP to decide whether to allow access? How did you originally prevent users from having normal ssh access? – Dan Feb 22 '13 at 13:48
Hi, Dan. To prevent users from having normal ssh access I use these directives: Subsystem sftp internal-sftp Match Group ldapgroup ChrootDirectory /users/%u X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp Match – bmenendez Feb 22 '13 at 17:53
AllowUsers in sshd_config, man sshd_config can help you – c4f4t0r Dec 30 '13 at 11:15

Your Answer


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

Browse other questions tagged or ask your own question.