Password authentication

Asked by Hyeja Park on 2017-09-08

I had a problem with my machine after installing the package with the deb file below.

The first problem was that port 22 was blocked on the firewall.
This is solved with ufw,
After that, password authentication is not possible when ssh is connected.

What is the solution to this problem?

--------------------------------------------------------------------------------------
xxdiff-4.0.1.tar.bz2
qt5-qmake_5.5.1+dfsg-16ubuntu7_amd64.deb
libqt4-designer_4.8.7+dfsg-5ubuntu2_amd64.deb
libqt4-dev-bin_4.8.7+dfsg-5ubuntu2_amd64.deb
libqt4-dev_4.8.7+dfsg-5ubuntu2_amd64.deb
libqt4-help_4.8.7+dfsg-5ubuntu2_amd64.deb
libqt4-qt3support_4.8.7+dfsg-5ubuntu2_amd64.deb
libqt4-scripttools_4.8.7+dfsg-5ubuntu2_amd64.deb
libqt4-svg_4.8.7+dfsg-5ubuntu2_amd64.deb
libqt4-test_4.8.7+dfsg-5ubuntu2_amd64.deb
qt4-default_4.8.7+dfsg-5ubuntu2_amd64.deb
qt4-linguist-tools_4.8.7+dfsg-5ubuntu2_amd64.deb
qt4-qmake_4.8.7+dfsg-5ubuntu2_amd64.deb
perl_5.22.1-9_amd64.deb
--------------------------------------------------------------------------------------

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Hyeja Park
Solved:
2017-09-13
Last query:
2017-09-13
Last reply:
2017-09-12

If you use:

ssh -v user@host

You will see the debugging details as the connection is established.

Hyeja Park (hjpark97) said : #2
Hyeja Park (hjpark97) said : #3

It is error log at ssh command.

Sep 11 14:47:57 nwp_srs sshd[79704]: PAM (sshd) illegal module type: @include
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM pam_parse: expecting return value; [...common-auth]
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM (sshd) no module name supplied
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM (sshd) illegal module type: @include
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM pam_parse: expecting return value; [...common-account]
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM (sshd) no module name supplied
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM unable to dlopen(/usr/local/pam/Linux-PAM-1.1.8/lib/security/pam_selinux.so): /usr/local/pam/Linux-PAM-1.1.8/lib/security/pam_selinux.so: cannot open shared object file: No such file or directory
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM adding faulty module: /usr/local/pam/Linux-PAM-1.1.8/lib/security/pam_selinux.so
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM (sshd) illegal module type: @include
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM pam_parse: expecting return value; [...common-session]
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM (sshd) no module name supplied
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM (sshd) illegal module type: @include
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM pam_parse: expecting return value; [...common-password]
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM (sshd) no module name supplied
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM (other) illegal module type: @include
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM pam_parse: expecting return value; [...common-auth]
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM (other) no module name supplied
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM (other) illegal module type: @include
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM pam_parse: expecting return value; [...common-account]
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM (other) no module name supplied
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM (other) illegal module type: @include
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM pam_parse: expecting return value; [...common-password]
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM (other) no module name supplied
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM (other) illegal module type: @include
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM pam_parse: expecting return value; [...common-session]
Sep 11 14:47:57 nwp_srs sshd[79704]: PAM (other) no module name supplied
Sep 11 14:47:57 nwp_srs sshd[79704]: Failed password for hanul from 190.1.8.92 port 54364 ssh2

Hyeja Park (hjpark97) said : #4

I'm sorry. The above log was wrong.

Below is the error log for the ssh command.

root@nwp_srs:/etc/init.d# ssh -v hanul@localhost
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to localhost [::1] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.1
ssh_exchange_identification: read: Connection reset by peer

Have you enabled root SSH on the server side? This is not secure and not encouraged

Hyeja Park (hjpark97) said : #6

The problem with my system was that it could not be ssh access.
This was a problem with the pam library duplication, which was resolved after the pam library path was cleaned up.

In addition, my system will not log in directly to the root account.