Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

Suppose, the server address is abcd.com. On my local machine at my workplace, I have to login to that server, using

ssh <my employeeid>@abcd.com

Then, to login to user myname , I have to use

su - myname

This way I login, but why can't I directly login to that server using

ssh myname@abcd.com
share|improve this question
Check /var/log/auth.log. The user is probably not allowed to use SSH. Other ways to find more information is to make ssh more verbose with one or more -v flags or to run the daemon with a -d (debug) flag. – jippie Apr 15 '12 at 12:42
up vote 2 down vote accepted

If you can't, this means that SSH daemon configuration (on the server) forbids it. This can be done by several different settings in /etc/ssh/sshd_config: AllowUsers, AllowGroups, DenyGroups and DenyUsers. Have a look at man sshd_config.

The order of interpreting those directives is also described in the manpage:

By default, login is allowed for all groups. The allow/deny directives are processed in the following order: DenyUsers, AllowUsers, DenyGroups, and finally AllowGroups.

share|improve this answer
Thanks ! ..Thats what I was looking for. – Novice User Apr 15 '12 at 14:58

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.