Question

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

Posted November 5, 2016 3.4k views
UbuntuLogging

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?

1 comment

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.

×
3 answers

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

Submit an Answer