billchurch / webssh2

Web SSH Client using ssh2, socket.io, xterm.js, and express. webssh webssh2
MIT License
2.36k stars 536 forks source link

Getting Authentication failure error even when I am passing username and password in config.json #334

Open prateekagrawl opened 1 year ago

prateekagrawl commented 1 year ago

Below is the error:

image

The config is:

image

Please let me know how can it be fixed?

billchurch commented 1 year ago

Try enabling debug for the ssh2 module and see what it says. Also you should check the auth logs on the server you're attempting to log into. Historically people try to login as root with a password, but that is usually disabled for SSH.

To enable debug for the ssh2 module with this project, run it like so:

DEBUG=ssh2 npm run start

The output should be something like this (successful login):

WebSSH2 service listening on 0.0.0.0:2222
  ssh2 Custom crypto binding not available +0ms
  ssh2 Local ident: 'SSH-2.0-ssh2js1.11.0' +1ms
  ssh2 Client: Trying 192.168.0.1 on port 22 ... +1ms
  ssh2 Socket connected +8ms
  ssh2 Remote ident: 'SSH-2.0-OpenSSH_8.9 FreeBSD-openssh-portable-8.9.p1_4,1' +17ms
  ssh2 Outbound: Sending KEXINIT +1ms
  ssh2 Inbound: Handshake in progress +2ms
  ssh2 Handshake: (local) KEX method: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1 +0ms
  ssh2 Handshake: (remote) KEX method: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,sntrup761x25519-sha512@openssh.com,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256 +0ms
  ssh2 Handshake: KEX algorithm: ecdh-sha2-nistp256 +0ms
  ssh2 Handshake: (local) Host key format: ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa +0ms
  ssh2 Handshake: (remote) Host key format: rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519 +0ms
  ssh2 Handshake: Host key format: ssh-ed25519 +0ms
  ssh2 Handshake: (local) C->S cipher: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm,aes128-gcm@openssh.com,aes256-gcm,aes256-gcm@openssh.com,aes256-cbc +0ms
  ssh2 Handshake: (remote) C->S cipher: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com +0ms
  ssh2 Handshake: C->S Cipher: aes128-ctr +0ms
  ssh2 Handshake: (local) S->C cipher: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm,aes128-gcm@openssh.com,aes256-gcm,aes256-gcm@openssh.com,aes256-cbc +0ms
  ssh2 Handshake: (remote) S->C cipher: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com +0ms
  ssh2 Handshake: S->C cipher: aes128-ctr +0ms
  ssh2 Handshake: (local) C->S MAC: hmac-sha2-256,hmac-sha2-512,hmac-sha1 +0ms
  ssh2 Handshake: (remote) C->S MAC: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 +0ms
  ssh2 Handshake: C->S MAC: hmac-sha2-256 +0ms
  ssh2 Handshake: (local) S->C MAC: hmac-sha2-256,hmac-sha2-512,hmac-sha1 +0ms
  ssh2 Handshake: (remote) S->C MAC: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 +0ms
  ssh2 Handshake: S->C MAC: hmac-sha2-256 +0ms
  ssh2 Handshake: (local) C->S compression: none,zlib@openssh.com,zlib +0ms
  ssh2 Handshake: (remote) C->S compression: none,zlib@openssh.com +0ms
  ssh2 Handshake: C->S compression: none +0ms
  ssh2 Handshake: (local) S->C compression: none,zlib@openssh.com,zlib +0ms
  ssh2 Handshake: (remote) S->C compression: none,zlib@openssh.com +0ms
  ssh2 Handshake: S->C compression: none +0ms
  ssh2 Outbound: Sending KEXECDH_INIT +0ms
  ssh2 Received DH Reply +5ms
  ssh2 Host accepted by default (no verification) +0ms
  ssh2 Host accepted (verified) +0ms
  ssh2 Outbound: Sending NEWKEYS +0ms
  ssh2 Inbound: NEWKEYS +0ms
  ssh2 Verifying signature ... +2ms
  ssh2 Verified signature +0ms
  ssh2 Handshake completed +1ms
  ssh2 Outbound: Sending SERVICE_REQUEST (ssh-userauth) +1ms
  ssh2 Inbound: Received SERVICE_ACCEPT (ssh-userauth) +1ms
  ssh2 Outbound: Sending USERAUTH_REQUEST (none) +1ms
  ssh2 Inbound: Received USERAUTH_FAILURE (publickey,password,keyboard-interactive) +9ms
  ssh2 Client: none auth failed +0ms
  ssh2 Outbound: Sending USERAUTH_REQUEST (password) +0ms
  ssh2 Inbound: Received USERAUTH_SUCCESS +501ms
WebSSH2 (zxxsUYILHK5A6OsU7XY5xirrR_Lb6-UO/iLmo7AuJQ14YohdIAAAB) AUDIT: LOGIN user=root from=127.0.0.1 host=192.168.0.1:22
  ssh2 Outbound: Sending CHANNEL_OPEN (r:0, session) +5ms
  ssh2 Inbound: GLOBAL_REQUEST (hostkeys-00@openssh.com) +18ms
  ssh2 Outbound: Sending GLOBAL_REQUEST (hostkeys-prove-00@openssh.com) +1ms
  ssh2 Inbound: CHANNEL_OPEN_CONFIRMATION (r:0, s:0) +1ms
  ssh2 Outbound: Sending CHANNEL_REQUEST (r:0, pty-req) +1ms
  ssh2 Inbound: REQUEST_SUCCESS +19ms
  ssh2 Inbound: CHANNEL_SUCCESS (r:0) +1ms
  ssh2 Outbound: Sending CHANNEL_REQUEST (r:0, shell) +0ms
  ssh2 Inbound: CHANNEL_WINDOW_ADJUST (r:0, 2097152) +2ms
  ssh2 Inbound: CHANNEL_SUCCESS (r:0) +1ms
  ssh2 Inbound: CHANNEL_DATA (r:0, 635) +2ms
  ssh2 Inbound: CHANNEL_DATA (r:0, 77) +122ms
  ssh2 Inbound: CHANNEL_DATA (r:0, 40) +11ms
  ssh2 Inbound: CHANNEL_DATA (r:0, 48) +1ms
  ssh2 Inbound: CHANNEL_DATA (r:0, 40) +0ms
  ssh2 Inbound: CHANNEL_DATA (r:0, 46) +1ms
  ssh2 Inbound: CHANNEL_DATA (r:0, 68) +1ms
  ssh2 Inbound: CHANNEL_DATA (r:0, 51) +0ms
  ssh2 Inbound: CHANNEL_DATA (r:0, 10) +0ms
  ssh2 Inbound: CHANNEL_DATA (r:0, 120) +37ms
  ssh2 Inbound: CHANNEL_DATA (r:0, 8) +0ms
  ssh2 Inbound: CHANNEL_DATA (r:0, 60) +12ms
  ssh2 Inbound: CHANNEL_DATA (r:0, 8) +1ms
  ssh2 Inbound: CHANNEL_DATA (r:0, 62) +11ms
  ssh2 Inbound: CHANNEL_DATA (r:0, 8) +0ms
  ssh2 Inbound: CHANNEL_DATA (r:0, 58) +11ms
  ssh2 Inbound: CHANNEL_DATA (r:0, 282) +11ms
  ssh2 Inbound: CHANNEL_DATA (r:0, 146) +1ms

Or this (invalid credentials/login not permitted):

    ssh2 Custom crypto binding not available +0ms
  ssh2 Local ident: 'SSH-2.0-ssh2js1.11.0' +0ms
  ssh2 Client: Trying 192.168.0.167 on port 22 ... +0ms
  ssh2 Socket connected +3ms
  ssh2 Remote ident: 'SSH-2.0-OpenSSH_8.4p1 Debian-5+deb11u1' +18ms
  ssh2 Outbound: Sending KEXINIT +0ms
  ssh2 Inbound: Handshake in progress +2ms
  ssh2 Handshake: (local) KEX method: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1 +1ms
  ssh2 Handshake: (remote) KEX method: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256 +0ms
  ssh2 Handshake: KEX algorithm: ecdh-sha2-nistp256 +0ms
  ssh2 Handshake: (local) Host key format: ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa +0ms
  ssh2 Handshake: (remote) Host key format: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519 +0ms
  ssh2 Handshake: Host key format: ssh-ed25519 +0ms
  ssh2 Handshake: (local) C->S cipher: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm,aes128-gcm@openssh.com,aes256-gcm,aes256-gcm@openssh.com,aes256-cbc +0ms
  ssh2 Handshake: (remote) C->S cipher: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com +0ms
  ssh2 Handshake: C->S Cipher: aes128-ctr +0ms
  ssh2 Handshake: (local) S->C cipher: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm,aes128-gcm@openssh.com,aes256-gcm,aes256-gcm@openssh.com,aes256-cbc +0ms
  ssh2 Handshake: (remote) S->C cipher: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com +0ms
  ssh2 Handshake: S->C cipher: aes128-ctr +0ms
  ssh2 Handshake: (local) C->S MAC: hmac-sha2-256,hmac-sha2-512,hmac-sha1 +0ms
  ssh2 Handshake: (remote) C->S MAC: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 +0ms
  ssh2 Handshake: C->S MAC: hmac-sha2-256 +0ms
  ssh2 Handshake: (local) S->C MAC: hmac-sha2-256,hmac-sha2-512,hmac-sha1 +0ms
  ssh2 Handshake: (remote) S->C MAC: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 +0ms
  ssh2 Handshake: S->C MAC: hmac-sha2-256 +0ms
  ssh2 Handshake: (local) C->S compression: none,zlib@openssh.com,zlib +0ms
  ssh2 Handshake: (remote) C->S compression: none,zlib@openssh.com +0ms
  ssh2 Handshake: C->S compression: none +0ms
  ssh2 Handshake: (local) S->C compression: none,zlib@openssh.com,zlib +0ms
  ssh2 Handshake: (remote) S->C compression: none,zlib@openssh.com +0ms
  ssh2 Handshake: S->C compression: none +0ms
  ssh2 Outbound: Sending KEXECDH_INIT +0ms
  ssh2 Received DH Reply +6ms
  ssh2 Host accepted by default (no verification) +0ms
  ssh2 Host accepted (verified) +0ms
  ssh2 Outbound: Sending NEWKEYS +0ms
  ssh2 Inbound: NEWKEYS +0ms
  ssh2 Verifying signature ... +1ms
  ssh2 Verified signature +0ms
  ssh2 Handshake completed +0ms
  ssh2 Outbound: Sending SERVICE_REQUEST (ssh-userauth) +0ms
  ssh2 Inbound: Received SERVICE_ACCEPT (ssh-userauth) +1ms
  ssh2 Outbound: Sending USERAUTH_REQUEST (none) +0ms
  ssh2 Inbound: Received USERAUTH_FAILURE (publickey,password) +8ms
  ssh2 Client: none auth failed +0ms
  ssh2 Outbound: Sending USERAUTH_REQUEST (password) +0ms
  ssh2 Inbound: Received USERAUTH_FAILURE (publickey,password) +4s
  ssh2 Client: password auth failed +1ms
  ssh2 Outbound: Sending USERAUTH_REQUEST (keyboard-interactive) +1ms
  ssh2 Inbound: Received USERAUTH_FAILURE (publickey,password) +9ms
  ssh2 Client: keyboard-interactive auth failed +0ms
WebSSH2 (ywjuJE2e_ROLplbNn6DZ8ke1_A4Y3Xpj/pGCwIaqrQe7F73zNAAAF) ERROR: CONN ERROR: Authentication failure user=root from=127.0.0.1
  ssh2 Outbound: Sending DISCONNECT (11) +7ms
  ssh2 Socket ended +8ms
  ssh2 Socket closed +2ms

auth.log from the server:

Aug 22 10:45:02 sshtest sshd[454]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.0.131  user=root
Aug 22 10:45:05 sshtest sshd[454]: Failed password for root from 192.168.0.131 port 61166 ssh2
Aug 22 10:45:06 sshtest sshd[454]: Received disconnect from 192.168.0.131 port 61166:11:  [preauth]
Aug 22 10:45:06 sshtest sshd[454]: Disconnected from authenticating user root 192.168.0.131 port 61166 [preauth]

Relevant section from /etc/ssh/sshd_config may look something like one of the following:

# PermitRootLogin prohibit-password
PermitRootLogin no

Some distros disable this by default (and for good reason). I don't recommend changing this in practice but for testing on non-production it's fine I suppose. Change to:

PermitRootLogin yes

and restart sshd, it should now be successful...

Otherwise, we'll look at your log outputs and see what the server or the ssh2 module is complaining about.

You can also increase verbosity of the ssh2 server logs (I recommend this if the above doesn't fix it), in /etc/ssh/sshd_config by uncommenting/adding or replacing the LogLevel option to DEBUG3:

LogLevel DEBUG3

The auth log from the server will now be chock full of information that may or may not be helpful:

Aug 22 10:56:51 sshtest sshd[545]: Received disconnect from 192.168.0.131 port 61264:11: 
Aug 22 10:56:51 sshtest sshd[545]: Disconnected from user root 192.168.0.131 port 61264
Aug 22 10:56:51 sshtest sshd[545]: pam_unix(sshd:session): session closed for user root
Aug 22 10:56:57 sshtest sshd[585]: debug3: fd 5 is not O_NONBLOCK
Aug 22 10:56:57 sshtest sshd[585]: debug1: Forked child 589.
Aug 22 10:56:57 sshtest sshd[585]: debug3: send_rexec_state: entering fd = 8 config len 329
Aug 22 10:56:57 sshtest sshd[585]: debug3: ssh_msg_send: type 0
Aug 22 10:56:57 sshtest sshd[585]: debug3: send_rexec_state: done
Aug 22 10:56:57 sshtest sshd[589]: debug3: oom_adjust_restore
Aug 22 10:56:57 sshtest sshd[589]: debug1: Set /proc/self/oom_score_adj to 0
Aug 22 10:56:57 sshtest sshd[589]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8
Aug 22 10:56:57 sshtest sshd[589]: debug1: inetd sockets after dupping: 4, 4
Aug 22 10:56:57 sshtest sshd[589]: Connection from 192.168.0.131 port 61326 on 192.168.0.167 port 22 rdomain ""
Aug 22 10:56:57 sshtest sshd[589]: debug1: Local version string SSH-2.0-OpenSSH_8.4p1 Debian-5+deb11u1
Aug 22 10:56:57 sshtest sshd[589]: debug1: Remote protocol version 2.0, remote software version ssh2js1.11.0
Aug 22 10:56:57 sshtest sshd[589]: debug1: no match: ssh2js1.11.0
Aug 22 10:56:57 sshtest sshd[589]: debug2: fd 4 setting O_NONBLOCK
Aug 22 10:56:57 sshtest sshd[589]: debug3: ssh_sandbox_init: preparing seccomp filter sandbox
Aug 22 10:56:57 sshtest sshd[589]: debug2: Network child is on pid 590
Aug 22 10:56:57 sshtest sshd[589]: debug3: preauth child monitor started
Aug 22 10:56:57 sshtest sshd[589]: debug3: privsep user:group 102:65534 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug1: permanently_set_uid: 102/65534 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: ssh_sandbox_child: setting PR_SET_NO_NEW_PRIVS [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: ssh_sandbox_child: attaching seccomp filter program [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug1: list_hostkey_types: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: send packet: type 20 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug1: SSH2_MSG_KEXINIT sent [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: receive packet: type 20 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug1: SSH2_MSG_KEXINIT received [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: local server KEXINIT proposal [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: compression ctos: none,zlib@openssh.com [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: compression stoc: none,zlib@openssh.com [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: languages ctos:  [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: languages stoc:  [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: first_kex_follows 0  [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: reserved 0  [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: peer client KEXINIT proposal [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: KEX algorithms: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: host key algorithms: ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: ciphers ctos: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm,aes128-gcm@openssh.com,aes256-gcm,aes256-gcm@openssh.com,aes256-cbc [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: ciphers stoc: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm,aes128-gcm@openssh.com,aes256-gcm,aes256-gcm@openssh.com,aes256-cbc [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: MACs ctos: hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: MACs stoc: hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: compression ctos: none,zlib@openssh.com,zlib [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: compression stoc: none,zlib@openssh.com,zlib [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: languages ctos:  [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: languages stoc:  [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: first_kex_follows 0  [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: reserved 0  [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug1: kex: algorithm: ecdh-sha2-nistp256 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug1: kex: host key algorithm: ssh-ed25519 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: receive packet: type 30 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_sshkey_sign entering [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_request_send entering: type 6 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_request_receive entering
Aug 22 10:56:57 sshtest sshd[589]: debug3: monitor_read: checking request 6
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_answer_sign
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_answer_sign: KEX signature 0x55d6d5ecdfa0(83)
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_request_send entering: type 7
Aug 22 10:56:57 sshtest sshd[589]: debug2: monitor_read: 6 used once, disabling now
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_sshkey_sign: waiting for MONITOR_ANS_SIGN [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_request_receive_expect entering: type 7 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_request_receive entering [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: send packet: type 31 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: send packet: type 21 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: set_newkeys: mode 1 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug1: rekey out after 4294967296 blocks [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug1: SSH2_MSG_NEWKEYS sent [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug1: expecting SSH2_MSG_NEWKEYS [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: receive packet: type 21 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug1: SSH2_MSG_NEWKEYS received [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: set_newkeys: mode 0 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug1: rekey in after 4294967296 blocks [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug1: KEX done [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: receive packet: type 5 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: send packet: type 6 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: receive packet: type 50 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug1: userauth-request for user root service ssh-connection method none [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug1: attempt 0 failures 0 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_getpwnamallow entering [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_request_send entering: type 8 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_getpwnamallow: waiting for MONITOR_ANS_PWNAM [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_request_receive_expect entering: type 9 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_request_receive entering [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_request_receive entering
Aug 22 10:56:57 sshtest sshd[589]: debug3: monitor_read: checking request 8
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_answer_pwnamallow
Aug 22 10:56:57 sshtest sshd[589]: debug2: parse_server_config_depth: config reprocess config len 329
Aug 22 10:56:57 sshtest sshd[589]: debug2: parse_server_config_depth: config  len 0
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_answer_pwnamallow: sending MONITOR_ANS_PWNAM: 1
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_request_send entering: type 9
Aug 22 10:56:57 sshtest sshd[589]: debug2: monitor_read: 8 used once, disabling now
Aug 22 10:56:57 sshtest sshd[589]: debug2: input_userauth_request: setting up authctxt for root [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_start_pam entering [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_request_send entering: type 100 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_inform_authserv entering [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_request_send entering: type 4 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: input_userauth_request: try method none [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: user_specific_delay: user specific delay 0.000ms [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: ensure_minimum_time_since: elapsed 9.554ms, delaying 2.384ms (requested 5.969ms) [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: userauth_finish: failure partial=0 next methods="publickey,password" [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: send packet: type 51 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: receive packet: type 50 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug1: userauth-request for user root service ssh-connection method password [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug1: attempt 1 failures 0 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug2: input_userauth_request: try method password [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_auth_password entering [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_request_send entering: type 12 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_auth_password: waiting for MONITOR_ANS_AUTHPASSWORD [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_request_receive_expect entering: type 13 [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_request_receive entering [preauth]
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_request_receive entering
Aug 22 10:56:57 sshtest sshd[589]: debug3: monitor_read: checking request 100
Aug 22 10:56:57 sshtest sshd[589]: debug1: PAM: initializing for "root"
Aug 22 10:56:57 sshtest sshd[589]: debug1: PAM: setting PAM_RHOST to "192.168.0.131"
Aug 22 10:56:57 sshtest sshd[589]: debug1: PAM: setting PAM_TTY to "ssh"
Aug 22 10:56:57 sshtest sshd[589]: debug2: monitor_read: 100 used once, disabling now
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_request_receive entering
Aug 22 10:56:57 sshtest sshd[589]: debug3: monitor_read: checking request 4
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_answer_authserv: service=ssh-connection, style=, role=
Aug 22 10:56:57 sshtest sshd[589]: debug2: monitor_read: 4 used once, disabling now
Aug 22 10:56:57 sshtest sshd[589]: debug3: mm_request_receive entering
Aug 22 10:56:57 sshtest sshd[589]: debug3: monitor_read: checking request 12
Aug 22 10:56:57 sshtest sshd[589]: debug3: PAM: sshpam_passwd_conv called with 1 messages
Aug 22 10:56:57 sshtest sshd[589]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.0.131  user=root
Aug 22 10:56:59 sshtest sshd[589]: debug1: PAM: password authentication failed for root: Authentication failure
Aug 22 10:56:59 sshtest sshd[589]: debug3: mm_answer_authpassword: sending result 0
Aug 22 10:56:59 sshtest sshd[589]: debug3: mm_request_send entering: type 13
Aug 22 10:56:59 sshtest sshd[589]: Failed password for root from 192.168.0.131 port 61326 ssh2
Aug 22 10:56:59 sshtest sshd[589]: debug3: mm_auth_password: user not authenticated [preauth]
Aug 22 10:56:59 sshtest sshd[589]: debug3: user_specific_delay: user specific delay 0.000ms [preauth]
Aug 22 10:56:59 sshtest sshd[589]: debug3: ensure_minimum_time_since: elapsed 2290.570ms, delaying 765.689ms (requested 5.969ms) [preauth]
Aug 22 10:57:00 sshtest sshd[589]: debug3: userauth_finish: failure partial=0 next methods="publickey,password" [preauth]
Aug 22 10:57:00 sshtest sshd[589]: debug3: send packet: type 51 [preauth]
Aug 22 10:57:00 sshtest sshd[589]: debug3: receive packet: type 50 [preauth]
Aug 22 10:57:00 sshtest sshd[589]: debug1: userauth-request for user root service ssh-connection method keyboard-interactive [preauth]
Aug 22 10:57:00 sshtest sshd[589]: debug1: attempt 2 failures 1 [preauth]
Aug 22 10:57:00 sshtest sshd[589]: debug2: Unrecognized authentication method name: keyboard-interactive [preauth]
Aug 22 10:57:00 sshtest sshd[589]: debug3: user_specific_delay: user specific delay 0.000ms [preauth]
Aug 22 10:57:00 sshtest sshd[589]: debug3: ensure_minimum_time_since: elapsed 0.025ms, delaying 5.945ms (requested 5.969ms) [preauth]
Aug 22 10:57:00 sshtest sshd[589]: debug3: userauth_finish: failure partial=0 next methods="publickey,password" [preauth]
Aug 22 10:57:00 sshtest sshd[589]: debug3: send packet: type 51 [preauth]
Aug 22 10:57:00 sshtest sshd[589]: debug3: receive packet: type 1 [preauth]
Aug 22 10:57:00 sshtest sshd[589]: Received disconnect from 192.168.0.131 port 61326:11:  [preauth]
Aug 22 10:57:00 sshtest sshd[589]: Disconnected from authenticating user root 192.168.0.131 port 61326 [preauth]
Aug 22 10:57:00 sshtest sshd[589]: debug1: do_cleanup [preauth]
Aug 22 10:57:00 sshtest sshd[589]: debug3: PAM: sshpam_thread_cleanup entering [preauth]
Aug 22 10:57:00 sshtest sshd[589]: debug1: monitor_read_log: child log fd closed
Aug 22 10:57:00 sshtest sshd[589]: debug3: mm_request_receive entering
Aug 22 10:57:00 sshtest sshd[589]: debug1: do_cleanup
Aug 22 10:57:00 sshtest sshd[589]: debug1: PAM: cleanup
Aug 22 10:57:00 sshtest sshd[589]: debug3: PAM: sshpam_thread_cleanup entering
Aug 22 10:57:00 sshtest sshd[589]: debug1: Killing privsep child 590
Aug 22 10:57:00 sshtest sshd[589]: debug1: audit_event: unhandled event 12
Aug 22 10:57:00 sshtest sshd[585]: debug1: main_sigchld_handler: Child exited

Basically, it's saying the username/password is incorrect... Which also is the same as if you set PermitRoot no