# SSH authentication issue

## Sephren

Hi,

I have a bit of a weird issue. Logging in through SSH using password authentication no longer works. PK authentication, however works. Since I always use key authentication personally, I did not discover the issue in time to figure out what kind of config changes and/or updates could have caused this issue and I really don't know where to start. Any help would be appreciated.

----------

## vaxbrat

look at your /etc/pam.d at sshd probably

----------

## cach0rr0

can you post the following:

```

grep -v ^\# /etc/ssh/sshd_config |grep -v ^$

```

(should be able to paste that verbatim)

----------

## Sephren

The content of /etc/pam.d are unmodified for sure

The content of sshd_config should also be unmodified and they are pretty much the same as other boxes I have where password login is working.

```
Protocol 2                                                                                                                                     

PasswordAuthentication no                                                                                                                      

UsePAM yes                                                                                                                                     

PrintMotd no                                                                                                                                   

PrintLastLog no                                                                                                                                

Subsystem       sftp    /usr/lib/misc/sftp-server 
```

I also tried to set UsePAM to "no", but that didn't help either. And that is the weird thing. To me, it looks like the issue is neither with pam, nor with ssh itself.

----------

## Sephren

No one that can help out with this?

----------

## Hu

After stripping comments and whitespace from both a working and non-working sshd_config, what is the result of running diff -u to compare them?  Similarly, strip and then compare the PAM files for working and non-working systems.  Finally, run both the client and server with debug output enabled, and compare the output between a session where password authentication is permitted and one where it is not.

----------

## Sephren

As I said, both of these two are distro versions. I.e no modifications have been made by them since install. Also, no configs I have tried works so I have no config to diff with.

----------

## Sephren

Here is some more information:

$ su - root - enter password: works

# login <username>: does not work

# login -f username: works

Could it be anything wrong with /etc/shadow or something? It strengthens my believes that it is the actual login procedure that is the issue and not SSH or PAM

----------

