0

I have connected to bastion-staging (ftp server-name) through SSH from local machine. I have get root access through sudo bash.

Now I am trying to SSH from bastion-staging (myserver-name) to ecash (another-server).

But when I run:

ssh root@ecash

I get an error:

          WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for '/root/.ssh/id_rsa' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /root/.ssh/id_rsa

Moreover, I have no password for ecash , I've been said I could ssh as root to another server (e.g ecash).

What should I do now?

  • Permissions 0777 for '/root/.ssh/id_rsa' are too open. <=== – DarkHeart Oct 8 '16 at 4:18
4

Fix the permissions for the file indicated in the error message (running the following as root):

chmod 600 /root/.ssh/id_rsa

The id_rsa contains a private key required, in your case, to connect to the ecash server. It should be protected from access by unauthorised accounts (much like the password).

Having 777 permissions to the means, however, the file is readable by anyone and SSH refuses to use the file. Changing the permissions to 600 makes the file readable and writable by the owner (root) account only which is a minimal requirement for ssh command to use the file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.