# Putty into RancherOS OK, ssh key rejected

**URL:** <https://forums.suse.com/t/putty-into-rancheros-ok-ssh-key-rejected/7572>\
**Category:** RancherOS\
**Created:** [October 14, 2017, 7:48am UTC](https://forums.suse.com/t/putty-into-rancheros-ok-ssh-key-rejected/7572 "2017-10-14T07:48:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wayland](https://avatars.discourse-cdn.com/v4/letter/w/ee59a6/32.png) [@wayland](https://forums.suse.com/u/wayland)\
**Post date:** [October 14, 2017, 7:48am UTC](https://forums.suse.com/t/putty-into-rancheros-ok-ssh-key-rejected/7572/1 "2017-10-14T07:48:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![superseb](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/superseb/32/2424_2.png) [@superseb](https://forums.suse.com/u/superseb)\
**Post date:** [October 15, 2017, 5:50pm UTC](https://forums.suse.com/t/putty-into-rancheros-ok-ssh-key-rejected/7572/2 "2017-10-15T17:50:01Z")

</div>

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](https://superuser.com/questions/232362/how-to-convert-ppk-key-to-openssh-key-under-linux)

---

<div class="post-metadata">

**Author:** ![wayland](https://avatars.discourse-cdn.com/v4/letter/w/ee59a6/32.png) [@wayland](https://forums.suse.com/u/wayland)\
**Post date:** [October 15, 2017, 7:43pm UTC](https://forums.suse.com/t/putty-into-rancheros-ok-ssh-key-rejected/7572/3 "2017-10-15T19:43:01Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [October 15, 2017, 8:25pm UTC](https://forums.suse.com/t/putty-into-rancheros-ok-ssh-key-rejected/7572/4 "2017-10-15T20:25:30Z")

</div>

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.
