1
  1. I created the keys with ssh-keygen -t rsa -b 2048 and also tried ssh-keygen without arguments (which should be the same).
  2. The private key is in .ssh/id_rsa
  3. Its permissions are 600
  4. The .ssh directory permissions are 700
  5. It is not using a passphrase
  6. using -i <key file> has no effect.
  7. The remote server log makes no mention of a failing key. It just looks like a normal password login. This is why I think it must be local ssh not finding the key.

I'm at a loss. I can ssh in using keys from another box (a Windows box, using PuTTY), so I know it is working on the server. My local Linux is Mint, which is an Ubuntu derivative, but I doubt that has anything to do with anything.

  • I tried running ssh-agent, but that both did nothing (after telling me it was adding my identity), and also seems to only be for passworded key files, which mine isn't.

Here are the results of the ssh command ssh -l remoteusername -p 85 domain.com -vvv: https://pastebin.com/n2ef8qGv

That output is from a time when I didn't use -i. But the file I'm specifying is .ssh/id_rsa anyway, which is the same.


Solved. The problem was in the format of my authorized_keys file on the server. I had concatenated the two keys together because my searches said that was all the format was. But they need to be separated by a newline.

Because /var/log/auth.log said nothing about it, I assumed the problem couldn't be the server. Guess I was wrong about that. I know the last time I had ssh problems the log showed it. In fact just now I broke it on purpose and tried to log in, and the log has nothing about a failed key login. I got the message "server refused our key" locally, which is good, but there is nothing on the server in /var/log/auth.log or with journalctl _COMM=sshd.

felwithe
  • 262

0 Answers0