Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 an account i SSH into. How do i switch to using a plain old password to login rather than my public/private key pair?

share|improve this question
5  
Why do you want to do this? – sciurus Aug 12 '11 at 21:42
3  
This is a terrible idea. I don't approve. – Tom O'Connor Aug 12 '11 at 21:43
3  
Is the next step re-enabling Telnet? (WHY do you want to do this?) – voretaq7 Aug 12 '11 at 21:54
2  
Can you clarify whether you are asking how to 1) Enable password authentication on a server where it is disabled or 2) Tell your ssh client to try password authentication before trying public key authentication? Shane's answer is appropriate if you're trying for #1, mine is for #2. – sciurus Aug 12 '11 at 22:38
    
One general problem with a private key is that you have no idea how it is being handled by clients. They could be carrying the private key around unencrypted on a USB memory for all I know. Passwords are good because they can be forced to adhere to a policy on a creation time. – Ztyx Sep 23 '15 at 8:52
up vote 5 down vote accepted

The PasswordAuthentication option in the /etc/ssh/sshd_config file controls whether passwords are allowed.

Really, though. Use public keys.

share|improve this answer

If you want to do this temporarily, you could connect to the server with ssh -o 'PubkeyAuthentication no' server. If you want to do this permanently, on the server you could remove your public key from ~/.ssh/authorized_keys or on your computer you could add the following to ~/.ssh/config

Hostname server
PubkeyAuthentication no

share|improve this answer

if you know the password it should be a matter of supplying the password... if you dont know it and have access to the system, simply reset it by running

passwd

to force it to use password login, you will have to remove your private key file from its currently location (linux/mac) or disable it in your ssh client

you also need to check that password auth is enabled in your ssh config

however i also echo the other comments, switching from key auth to password is NOT recommended as you are effectively lowering your level of security, i would be asking why you are making this kind of switch

share|improve this answer
    
This is not a good answer to the question – Richard Sep 18 '15 at 8:51

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.