Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm having trouble logging in to my server via ssh (putty) on a new username that I created.

During the initial installation of the server, I setup a username of "admin". While logged in as "admin" I run the following command: sudo useradd tempuser, then entered the password for the new username.

From my Windows box, I connect to the server and enter the new username of "tempuser" and hit enter. Now it asks for the password, which I've entered it successfully a couple of times and I receive access denied each time.

Do I have to add this new user somewhere else in order to log in via SSH?

share|improve this question
2  
Depends on your /etc/ssh/sshd_config. If you have the option AllowUsers defined, you'd need it there for sure. sshd manpage –  nerdwaller Jan 14 '13 at 4:12
    
Thank you...you sparked something there. I remember editing the sshd_config for something, its been awhile. I'll take a look, thanks again! –  Muhnamana Jan 17 '13 at 1:54
    
Yep sure enough, tempuser was not defined in the AllowUsers entry. Thanks again! –  Muhnamana Jan 17 '13 at 1:58
1  
Glad to hear it, good learning experience! –  nerdwaller Jan 17 '13 at 5:18

1 Answer 1

up vote 0 down vote accepted

You want to add tempuser to your sshd_config file.

To do so at a prompt:

sudo nano /etc/ssh/sshd_config

Look for a line, that by default reads: #AllowUsers; you want to change it to (or add it, if it doesn't exist) AllowUsers tempuser

Save the file - in nano it's CTRL-O then CTRL-X to quit, then type sudo service sshd restart to load the new config.

share|improve this answer
1  
It's /etc/ssh/sshd_config, not /etc/ssh/ssh_config. ssh_config is the program's config, sshd_config is the daemon's behavior. –  nerdwaller Jan 17 '13 at 5:17

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.