Abisar
By:
Abisar

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

November 5, 2016 177 views
Logging Ubuntu

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?

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

Have another answer? Share your knowledge.