1

I have a SSH public and private key pair (files) from a previous Linux installation along with the corresponding pass phrase:

~/id_rsa.pub
~/id_rsa.ppk

When I try to add the private key I get a warning message:

$ ssh-add id_rsa.ppk
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0444 for 'id_rsa.ppk' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.

What is the correct way to do this? I am using Linux Mint 18.1.

Update I found a solution on this page: https://superuser.com/questions/232362/how-to-convert-ppk-key-to-openssh-key-under-linux

gornvix
  • 463
  • 6
  • 18

2 Answers2

5

Fix the permissions (by removing group and world permissions altogether):

chmod go= ~/id_rsa.ppk

then add it:

ssh-add ~/id_rsa.ppk
Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
0

The standard permissions for SSH files in your ~/.ssh directory are:

~/.ssh: 700

id_rsa : 600

id_rsa.pub: 644

authorized_keys: 644

bretonics
  • 215