Hi,
I am having some real problems connecting to my VPS via SSH. I am very much a newcomer to this world but I have followed the Digital Ocean tutorial as well as taken advice from friends (and Google) but unfortunately I am not getting anywhere.
I am using Secure Shell, an official Google extension for Chrome OS.
The problem is that:
I cannot connect via SSH at all. Here are the steps I am taking…
a) Login via VNC from Digital Ocean control panel as user ‘adt’ with password b) Type command ‘ssh-keygen -t rsa’ and follow instructions to create two keys called id_rsa and id_rsa.pub c) Use command ‘ssh-copy-id adt@...’ (my IP address for VPS) d) Follow instructions and check that correct public key has been added to authorized_keys file e) Attempt SSH login using Secure Shell (Chrome OS extension mentioned above). I import both public and private key into the client. f) I am just asked, as normal, for my user password, not passphrase. Occasionally I have been asked to enter passphrase for id_rsa files and when doing this it seems to fail, no acknowledgement of password being entered correctly or even incorrectly.
Basically, I am not seeing any of my SSH sessions as being encrypted with SSH keys.
I have had this working before but that was when I created a Droplet with an existing SSH key I uploaded to the Digital Ocean control panel.
I am pretty certain I’m doing something wrong as I have tried on numerous Droplets but cannot get anywhere using the method above. It has been advised that I generate keys using a machine that is not the VPS but this is not easy using Chrome OS and I would have thought that as long as the keys are generated, it should not matter where they come from. If it does matter, then why are you able to generate a key on the VPS?
I have seen some information on the web pointing out that OpenSSH does not generate in the proper RSA format (this seems a bit counter-productive if true!)
I’m really just looking for some guidance, if possible!
Thanks in advance.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
What is the permission of ~/.ssh/authorized_keys? <br>That file should not be global writable, otherwise it will fail. <br>You may try to run: <br>sudo chmod 0600 ~/.ssh/authorized_keys <br> <br>You can also make the following changes to /etc/ssh/sshd_config to force public key authentication. <br> <br>PasswordAuthentication no <br>RSAAuthentication yes <br>PubkeyAuthentication yes
Hi Tony, thanks for your response. <br> <br>The file permissions are fine but I did run that command anyway. The permissions didn’t change once I did it so I presume they were set correctly in the first place. <br> <br>I have also altered those settings you mentioned in the sshd_config file previously after looking around on Google but I did try them again but to no avail. <br> <br>This leaves me here: <br> <br>I am connecting via Secure Shell client to my VPS with user ‘adt’. I am then met with this: <br>Enter passphrase for key ‘/.ssh/id_rsa’: <br>I can put in the passphrase and it lets me in as expected (but no confirmation of the connecting being secured with SSH key) or, worryingly, if I get the password wrong, I am prompted to enter it a further two times. When I have got it wrong for the third time I am then prompted for the user ‘adt’ password, completely negating the point of the key in the first place. <br> <br>Can you assist any further, please? <br> <br>Thanks! <br> <br>
I have just run the ‘reload ssh’ command and now I am locked out because of disabling passwords through sshd_config, obviously this is expected. <br> <br>So I am met with the same message about asking for the passphrase except this time, entering the correct passphrase won’t work and after the third attempt I am met with this message: <br>Permission denied (publickey). <br>NaCl plugin exited with status code 255.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.