- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
On your first SSH attempt, you might see: “ssh: handshake failed: unable to authenticate; attempted methods [none]; no supported methods remain.” This usually points to a problem with how the SSH key or certificate is set up. Because several issues can cause this, some investigation is needed to find the exact root. This guide walks you through a thorough troubleshooting process.
Step 1 — Raise SSHD log verbosity
a. Open the SSH server config:
sudo vi /etc/ssh/sshd_config (or sudo nano /etc/ssh/sshd_config)
b. Find the LogLevel setting and change it to DEBUG3.
Tip: If there is no LogLevel line, add a new line that says LogLevel DEBUG3 (place it outside any Match blocks).
Step 2 — Validate and restart sshd
a. Validate the config syntax:
sudo sshd -t
b. Restart the service:
sudo systemctl restart sshd
Step 3 — Generate fresh log entries
From the client machine, initiate a new SSH connection to the target (a brand-new session). Let it complete or fail—this will produce detailed logs.
Step 4 — Collect the diagnostics bundle
On the target host, run the collection script (from this KB) with sudo:
sudo ./target_logs.sh
Result
The script creates an archive named target_logs.tar.gz containing the following files helpful for analysis:
host_info.txt
journalctl_sshd.txt
sshd_config
sshd_full_configuration.txt
Optional — Verify archive contents
tar -tzf target_logs.tar.gz
See a list of things to check, actions and resolutions:
|
Type of connection |
Parameter |
File |
Analysis |
Resolution |
|
Vaulted credentials |
Passwordauthentication |
sshd_full_configuration.txt
|
If you use password auth for vaulted-credential connections, make sure it’s set to yes. |
Set Passwordauthentication to yes in sshd_config, then restart sshd. |
|
ZSP |
trustedusercakeys |
sshd_full_configuration.txt
|
Confirm it's not set to none and that it points to the current CA.pub file. If it's defined after Match User/Group blocks in sshd_config, it may not apply to all users. |
Move TrustedUserCAKeys key to the beginning of the sshd_config file (before Match Group/User definition) |
|
ZSP |
kexalgorithms |
sshd_full_configuration.txt
|
Ensure the list includes ssh-ed25519. If it’s missing, you may be running an older OpenSSH version or FIPS might be blocking it. |
If the key does not exist, you may be using an old openSSH version that is not supported. Another option is that you have FIPS enabled and it blocks the usage of this key. |
|
ZSP |
SELinux support |
journalctl_sshd.txt
|
If SELinux is enabled, temporarily switch to permissive mode and test. If the connection succeeds, switch back to enforcing and restore the context on the CA file. You can test via these commands: journalctl -t setroubleshoot ausearch -m AVC -ts recent |
Restore the SE Linux security context for /etc/ssh/xxx_public_CA.pub file; |
|
ZSP, Vaulted credentials |
Other errors |
journalctl_sshd.txt |
Look for errors in debug3 mode that can explain the issue |
|