tony brand

Qualys authentication using SSH - troubleshooting error Error $2226000c (SSH authentication failed) (diag=4)

Discussion created by tony brand on Mar 9, 2017

Qualys authentication using SSH - troubleshooting

 

If you get the following error in the results column for 105053: Unix Authentication Failed

 

Service SSH
User Name <account name>
Authentication Record <key name>

Diagnostics Start time: Thu 09 Mar 2017 11:33:05 AM GMT
+0:00:00 SSH: Authentication mode 'none' rejected by target with a 'failure' response code
+0:00:00 SSH: This is expected behavior for the 'none' authentication mode and does not indicate an error
+0:00:00 SSH: Authentication mode 'publickey' rejected by target with a 'failure' response code
+0:00:00 SSH: This usually means that the credentials were incorrect
+0:00:00 SSH: All SSH authentication attempts have failed
+0:00:00 SSH: Error $2226000c (SSH authentication failed) (diag=4)

 

You will also see this error in teh server system logs:

SSH Authentication Refused: Bad Ownership or Modes for Directory

 

Check that the home directory in which the SSH key resides has only got permissions for the account name used to login, and no group or world permissions granted

Use the command below to correct the privileges:

      chmod 700 /home/<account name>

where <account name> = user account being used to login.

The following permissions are also needed

chmod 700 /home/<account name>/.ssh

chmod 600 /home/<account name>/.ssh/authorized_keys

Outcomes