Putty into RancherOS OK, ssh key rejected

I followed the clean install of RancherOS (current version) into a VirtualBox from the live boot ISO.
I pasted my public key into the cloud-config.yml correctly since I can use Putty with the public key to get in as rancher with no password.

When I do so with ssh from Mint Linux
ssh -i ./docker/rsa-private.ppk rancher@rancher
ssh accepts the key but RancherOS rejects it.
When I look at the RancherOS logs I see an error about ServerKeyBits when ever I use ssh but not when I use Putty.

I need to be able to use ssh because I am using Putty via Wine.

The ServerKeyBits is wrong in the config but won’t deny a key. The file you are referring to is a Putty key, that can be used with Putty but not with OpenSSH. You can find the commands to convert the key here: https://superuser.com/questions/232362/how-to-convert-ppk-key-to-openssh-key-under-linux

Oh that makes sense. I used PuttyGen to make the key as per the instructions I was following. Really I want a key which works in ssh and putty. Or do I just make a 2nd key for ssh?

The “key” is the same but there are multiple ways to encode it into a text file. OpenSSH wants one (PEM) and you have another (PPK). The link above is for converting between them.

1 Like