0

I'm trying to connect to my server with a ssh connection, so it works when I use FileZilla but not with the command line ssh <login>@<ServerIP> -i /Volumes/ExternalDisk/key.ppk

I have this message error :

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for '/Volumes/ExternalDisk/key.ppk' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/Volumes/ExternalDisk/key.ppk": bad permissions
<login>@<ServerIP>: Permission denied (publickey,password).
ls -Asin /Volumes/ExternalDisk/
total 384
  2 64 drwxrwxrwx@ 1 501  20  32768 16 aoû 00:32 .Spotlight-V100
 87 64 drwxrwxrwx@ 1 501  20  32768 16 aoû 00:51 .Trashes
118 64 -rwxrwxrwx  1 501  20   4096 16 aoû 00:53 ._.Spotlight-V100
112 64 -rwxrwxrwx  1 501  20   4096 16 aoû 00:54 ._.Trashes
  4 64 drwxrwxrwx  1 501  20  32768 19 nov 13:35 .fseventsd
 90 64 -rwxrwxrwx  1 501  20   1460 13 aoû 01:50 key.ppk

I try also to use chmod 600 /Volumes/ExternalDisk/key.ppk and with sudo but nothing change.

Thanks in advance for your answers

1 Answer 1

0

The system requires you to set a little more private permissions to your private key, due to security reasons. To solve this, you would need to set the permissions of your file to either 0600 or 0660.

Try this command first chmod 600 /Volumes/ExternalDisk/key.ppk. If that doesn't work try chmod 660 /Volumes/ExternalDisk/key.ppk.

After executing one of the commands you can connect to your server with ssh <login>@<ServerIP> -i /Volumes/ExternalDisk/key.ppk.

1
  • any command doesn't work because I try : chmod 600 /Volumes/ExternalDisk/key.ppk chmod 660 /Volumes/ExternalDisk/key.ppk chmod 770 /Volumes/ExternalDisk/key.ppk chmod 700 /Volumes/ExternalDisk/key.ppk So whatever the number I put nothing change Commented Nov 21, 2021 at 18:18

You must log in to answer this question.

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