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 changed my .ssh/authorized_keys2 file and now I can no longer log in via ssh. When trying to connect, it immediately says "Connection closed by...".

Is there a way to ignore the change to authorized_key2 file so I can avoid bothering the root system admin?

share|improve this question
up vote 1 down vote accepted

If you just want to fail back to password login, you'll have to remove the keys from your local client's SSH directories. If they're not present, and the SSH server is configured to allow password logins, you'll get presented with a password login. This should allow you to change things so they work.

share|improve this answer
Check out Stefan's response. – Warner Aug 31 '10 at 19:15

This command should tell the ssh command to ignore your the keys in ~/.ssh/ :

ssh -o PreferredAuthentications=keyboard-interactive -o PubkeyAuthentication=no

However in my experience, this doesn't work everywhere.

I borrowed this answer from

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.