↑ ↓ select, Enter open, Esc close

Debug SSH connection problems with verbose output

Adjust the values, the command updates live
user@server
ssh -vvv -p 22 webuser@server.example.com

Prints every step of the connection setup: configuration files read, negotiated algorithms, keys offered and the server’s response. The lines with Offering public key and Authentications that can continue are particularly revealing. They show whether the wrong key is being offered or the method is rejected by the server.

Note: The server logs the reason for a rejection in the SSH service journal, often more clearly than the client.

Also searched as

  • ssh permission denied publickey debug
  • ssh verbose mode
  • why is ssh key not working

Related one-liners

All in SSH

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.