# My sshd is now passwordless?

## themaze75

Hi guys and gals.

Maybe you can help with fix something I *think* I've broken.

I was trying to set two gentoo boxes so that one could send a file to the other through sftp in a batch file.

In my experimentations, I came across this solution: Authenticating through Public Key, which someone told me could get me to have an authenticated "passwordless" access to a used on a linux box.

Turns out it wasn't what I was looking for (I have other solutions to try).

But the problem is that after having done that, all user accounts are now passwordless on my remote gentoo machine.   But only through sshd (which I have turned off, of course).  

Console login still has the passwords.

But ssh connections now accept any password for any user (even root).

I haven't changed any settings from the defaults in pam and sshd.

Anyone has any clue at what might have happend and/or (more importantly) how to fix this mess?

----------

## Taladar

Try re-emerging openssh and overwriting your config files (only openssh ones of course) with the default ones when etc-updating.

----------

## cmulcahy

It very well may be your ~/.ssh/authorized_keys2 file.  This file has a copy of the public key against which the private key is compared.  If you have a key in this file, it will usually be applied automagically.

Good luck!

----------

## themaze75

Taladar Thanks.  I'll try re-emerging openssh when I get back home (sshd being down limits remote fixing possibilities  :Smile: 

cmulcahy I've tried to undo the whole ssh thing by removing the whole ~/.ssh folder (which I created during the process).  Didn't fix anything.  I tried rebooting (I'm from Windows culture - if it ain't working, reboot it!).  No cigar as well.  Maybe the key is cached somewhere?

----------

## themaze75

Taladar:  Thanks man!  Re-emerging openssh and resetting the configs fixed everything.  Thank you very much!

----------

