Im able to run cat ~/.ssh/id_rsa meaning that my private keys are displayed on screen, I have a strong passphrase for it but doesn't that mean if my laptop was stolen, my private keys could just be copied to another key file and used to access my server I thought a passphrase would stop this kind of thing?

Is what I'm seeing from the cat command my key or is it encrypted?

They are 4096 bit RSA keys generated with the flag -o (for the new OpenSSH format)

  • 1
    Your private key needs to be readable by you so you can use it to decrypt and authenticate stuff that used your public key - but it should only be readable by you (not group or others).
    – HorusKol
    Mar 14, 2017 at 1:07

1 Answer 1


Having a password on your key protects against this exact thing. You cannot use someone else's key if it is password protected. Remember that if they do get their hands on your key, they can still try to brute force it, so make sure to use a strong password. If you had not password protected your key, it could be used by anyone who had physical access to your computer with the key on it.

  • 2
    ok so what I see is encrypted? or even if they copied the cat output to another file they would still need the password Mar 14, 2017 at 1:09
  • 1
    That is Correct
    – MikeSchem
    Mar 14, 2017 at 1:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .