> ## 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.

# Get RSA key length from public key
- URL: https://www.aktheknight.co.uk/get-rsa-key-length-from-public-key/
- Published: 2020-06-08T20:11:54.000Z
- Updated: 2020-06-08T20:11:54.000Z
- Author: Alex Knight
- Tags: ssh, linux, #Import 2026-08-20 09:17

With SSHMon I am spending a lot of time working with various SSH keys, and one thing I may need to know is the length of the key. Hence where this comes in:

```
ssh-keygen -lf id_rsa.pub
```

The command then returns the below results:

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

Output of the command