Question

Incorrect characters in console from my key press. How can I fix?

I press “a”, and it shows “^[a”. I press “e” and it shows “^[e”.

https://www.digitalocean.com/community/questions/displaying-invalid-character-in-digitalocean-console

The above issue seemed similar, but the solution didn’t work.

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.

Accepted Answer

Rebooting the server from the web interface (Power option - and the Power Cycle button) appears to have fixed it.

alexdo
Site Moderator
Site Moderator badge
December 8, 2020

Hello, all

The Copy/Paste functionality of our web console is a bit odd; the code backing it is custom due to the way the VNC window is implemented for accessing your Droplet. It isn’t a good idea, in my experience, to rely on the console for long copy/pasting like an SSH key.

My recommended method to get the key on the Droplet is over SSH itself. Also the web console is intended to access your droplet in a case of emergency in order to sort out the issue. I will highly recommend to use a ssh-client in order to access and manage your droplet.

You can also check our docs on How to Connect to Droplets with SSH:

https://www.digitalocean.com/docs/droplets/how-to/connect-with-ssh/

There are two options at the bottom of the doc: Connect with OpenSSH and Connect with PuTTY

You can enable PasswordAuthentication for your Droplet by modifying your /etc/ssh/sshd_config file. Once set to Yes restart the SSH service and connect via an SSH client for a more stable connection. You can then modify your ~/.ssh/authorized_keys file to add the appropriate public key.

This should do the job for you as well.

The other option is to temporary enable the PasswordAuthentication from no to yes in order to access your droplet using password and then once you’ve entered your key to disable the PasswordAuthentication again. This way is considered more secure than uploading the key to a Dropbox in case you don’t have any other server to us.

  1. Login to the console on DigitalOcean website.
  2. Type sudo nano /etc/ssh/sshd_config
  3. Change PasswordAuthentication from “no” to “yes” and save the file
  4. Open a terminal on your computer and type ssh username@[hostname or IP address] or if on a Windows box use PuTTY for password login making sure authentication parameters aren’t pointing to a private key
  5. Login with password
  6. Type sudo nano ~/.ssh/authorized_keys
  7. Paste public key text here and save the file
  8. Type sudo nano /etc/ssh/sshd_config
  9. Change PasswordAuthentication from “yes” to “no” and save the file
  10. Log out and attempt to log back in (if using PuTTY make sure you set up auth parameters to point to your private key)

Hope that this helps! Regards, Alex

Worked for me with CTRL pressed.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

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

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.