Report this

What is the reason for this report?

How Do I Give PrivateKey to Login From DO Access Console?

Posted on November 5, 2016

I broke my sshd_config file with a bad line. I can’t login from putty anymore. I have privatekey and publickey on my local machine.

But I tried DO console and it works, but can’t login because I can’t provide it the privatekey. How do I login now without resetting the password?



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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

you might need to temperately switch to user/password login and then switch to ssh keys

You can’t.

You can’t provide SSH key to do DO Console. First of reason is that Console is not an SSH connection, it doesn’t look at sshd_config. It would be like that you attach screen and keyboard physically to the server.

Now if you followed initial server guide, you probably have non-root user, e.g. sammy. You can use that user and password for it and you’ll be able to login without hassle. Problem is if you don’t have non-root user and don’t have root password. That would require you to use Reset root password. That option will email you new root password which you can use for login. Make sure that when you login with it, you’ll be asked to change it. First you must type old password, then two times new password.

I think this is better solution than recovery ISO as you don’t have to wait support for mount/unmount, down time is much less and you work directly on server. If you get any problem with it I will try to help you

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.