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.

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
Why do you want to do this? –  sciurus Aug 12 '11 at 21:42
This is a terrible idea. I don't approve. –  Tom O'Connor Aug 12 '11 at 21:43
Is the next step re-enabling Telnet? (WHY do you want to do this?) –  voretaq7 Aug 12 '11 at 21:54
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

3 Answers 3

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


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

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.