Question

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

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?

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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

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