What does identity file type mean in SSH debug messages?

Identity file is simply a private key (or cert), usually created by running ssh-keygen. This will by default create an RSA key, but you can change that with the -t option. According to your output, you have an RSA and an ECDSA key.

The number in identity file type .../.ssh/id_* type <number> is just the integer value (zero based) of the sshkey_types enum and -1 meaning error (as with most POSIX functions). You can see that the file names contain also the key type:

enum sshkey_types {
KEY_RSA, // id_rsa has type 0
KEY_DSA, // id_dsa has type 1, but as you have no id_dsa key file, -1 is used 
KEY_ECDSA, // id_ecdsa has type 2
...

The error messages key_load_public: No such file or directory after the identity file... messages is strange, it seems that the corresponding public key files got deleted. They carry the same file name as the private key with an added .pub suffix. This is not tragic, as the public key can be regenerated from the private key (but not vice versa, for obvious reasons) with ssh-keygen -y.

The debug output is explained in this nice Wikibooks article about OpenSSH logging. In short: The number in the debug[123]: ... line prefix indicates the debug level of the message behind it. It corresponds to the number of -vs you gave on the command line (with 3 being the maximum). I.e., if you set -v, debug1 messages will get printed, with -vv you will get debug1 and debug2 etc. (It's a little strange that you get debug3 messages even though you only gave a single -v, though)


As the output suggests, "type n" is the internal ID of the key type (RSA, ECDSA, ED25519, etc.). The list can be seen in sshkey.c.

Similarly, the n after debug is the debug level. The output you have shown is for -vvv, or debug logging up to level 3 (the maximum), hence debug1, debug2 and debug3.

The full details of both would generally be of use only to OpenSSH developers (primarily, OpenBSD developers), so I wouldn't expect this to be commonly discussed.

Tags:

Security

Ssh