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

Trying to SSH using a user account; root account works but I am specifying a private key. User account simply gives "Permission denied (publickey,gssapi-with-mic) without prompting me for my password at all.

How can I fix this so I can log in with a password, and NOT a key? I don't want to use a private key for this right now, but a regular account.

share|improve this question
1  
Key-based authentication still logs you into a "regular" account... –  womble Dec 31 '09 at 0:15

5 Answers 5

up vote 13 down vote accepted

The server has setting

 PasswordAuthentication no 

Change it to yes and after a restart you'll be able to use password authentication.

share|improve this answer

Check your login sequence with ssh -vv. This will tell you what authentication methods are tried and which fail. You can then enable what you want and disable what you don't want. Enable first, of course.

share|improve this answer

its in your sshd file (not ssh, which you'll also probably find in /etc/ssh)

I believe you want to make sure PasswordAuthentication yes is set and uncommented.

share|improve this answer
2  
af beat me to it by moments. -annoyingly I can't comment on his yet. You should be able to run /etc/init.d/sshd restart rather than having to reboot, after editing the conf. –  BuildTheRobots Dec 30 '09 at 17:40
    
and I typo'd when telling you what directive. sorry :( –  BuildTheRobots Dec 30 '09 at 19:53
    
MidnighToker: you should have an "edit" link at the bottom of your answer that you can use to fix the name of the directive (from PubkeyAuthentication to PasswordAuthentication) –  James Polley Dec 30 '09 at 20:19
    
thanks. It'll make me more careful in future -lost rep for that. –  BuildTheRobots Dec 30 '09 at 20:29
1  
That'd be /etc/init.d/sshd reload on any half-sane distro. –  womble Dec 31 '09 at 6:37

You will also need to make sure that you edit _/etc/ssh/sshd_config_ to have the setting:

ChallengeResponseAuthentication yes

as well as...

PasswordAuthentication yes

And remember to run /user/sbin/service ssh restart afterwards to pick up the new settings.

share|improve this answer
    
The literal /etc/ssh/sshd_config needs to have its underscore escaped with a backslash for the whole path to be displayed in italics . (Edits were too minor to submit them myself) –  ThorSummoner Nov 18 at 22:45

And in case anyone else runs into this problem, I've received this problem whenever the private key of the user has too open of permissions. In order to get it to work I had to chmod the private key to 400 (which is the permissions level by default when the key is created, I believe. Don't know why this one was different).

I don't know if this is always the case, though. This happened on a Mac.

share|improve this answer

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.