0

Trying to access my digital ocean server via a mac terminal.

ssh root@myipaddress

I'm then prompted for a password (I've never been prompted before, as I've left it blank intentionally.). After 3 failed attempts I get:

Permission denied (publickey,password).

I have also tried entering the ssh key for the server and get the same outcome.

I tried adding the key to my SSH-agent and get the following:

WARNING: UNPROTECTED PRIVATE KEY FILE!
Permissions 0644 for '/Users/xxxxx/.ssh/id_rsa.xxx.pub' are too open
It is required that your private key files are NOT accessible by others. 
This private key will be ignored.

I've tried contacting D.O. but have yet to hear back. Any help is greatly appreciated!

adam.shaleen
  • 993
  • 3
  • 9
  • 20

3 Answers3

3

I was finally able to access the server via:

ssh -i <keyfile> <user>@<hostname>

Seems like there was an issue with my machine defaulting to use my personal id_rsa file instead of the one that was created for this different server.

adam.shaleen
  • 993
  • 3
  • 9
  • 20
0

Have you tried the solution in: ssh "permissions are too open" error? Looks like the permissions on your private key are not restrictive enough.

Community
  • 1
  • 1
richmlee
  • 29
  • 4
0
WARNING: UNPROTECTED PRIVATE KEY FILE!
Permissions 0644 for '/Users/xxxxx/.ssh/id_rsa.xxx.pub' are too open

Above messages shows some clarification. Try the below permissions.

# chown user:user ~/.ssh/*
# chmod 600 ~/.ssh/private_key
# chmod 644 ~/.ssh/public_key.pub

Try with these permissions. From the logs it seems to be unprotected permission/ownership.

Also try with ssh -i ~/.ssh/private_key user@<IP> -vvv for more insights :)

Anto
  • 3,128
  • 1
  • 20
  • 20