Oracle OpenStack 4.0.1: ssh into instance failed with Permission denied: "Permissions 0644 for '/root/.ssh/MyKey.key' are too open."

(Doc ID 2401003.1)

Last updated on MAY 29, 2018

Applies to:

Oracle OpenStack for Oracle Linux - Version OpenStack 4.0.1 and later
Linux x86-64

Symptoms

When trying to ssh into an instance with floating IP, ssh failed:
$ ssh -i ~/.ssh/MyKey.key cloud-user@192.168.100.100
The authenticity of host '192.168.100.100 (192.168.100.100)' can't be established.
ECDSA key fingerprint is SHA256:PIMorbZase3wiSil0EO3jWExlLRwViyoRLcZd4tjxXc.
ECDSA key fingerprint is MD5:08:17:bf:f0:9b:8b:e4:6d:d0:94:7f:1f:bb:0c:4f:d5.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.100.100' (ECDSA) to the list of known hosts.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/root/.ssh/MyKey.key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/root/.ssh/MyKey.key": bad permissions
Permission denied (publickey,gssapi-keyex,gssapi-with-mic). 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms