> ## Content Index
> Fetch the complete content index at: https://www.aktheknight.co.uk/llms.txt
> Use this file to discover other available public pages before exploring further.

# Converting OpenSSH key into an RSA key
- URL: https://www.aktheknight.co.uk/converting-openssh-key-into-an-rsa-key/
- Published: 2020-05-25T20:51:00.000Z
- Updated: 2020-05-25T20:51:59.000Z
- Description: How to convert an OpenSSH format key into RSA format.
- Author: Alex Knight
- Tags: linux, ssh, #Import 2026-08-20 09:17

My current development project is [SSHMon](https://sshmon.aktheknight.co.uk/?ref=aktheknight.co.uk), a Monitoring as a Service application that can use SSH to directly monitor servers.

The SSH library in use, [SSH.NET](https://github.com/sshnet/SSH.NET?ref=aktheknight.co.uk) doesn't currently support OpenSSH keys, leading to the below error if I try to use OpenSSH instead of RSA format keys.

![](https://www.aktheknight.co.uk/content/images/2020/05/image-1.png)

Screenshot showing "Key 'OPENSSH' is not supported." from SSH.NET

Luckily, the OpenSSH lib has a way to convert formats, and I use that to convert any OpenSSH keys into RSA format. The command below will convert id\_rsa from OpenSSH into RSA format.

```Bash
ssh-keygen -p -m PEM -f ./id_rsa
```

Hopefully this can help someone else.