Question

copy-paste doesn't work from your console

How the heck do I copy or paste anything from the web console? I’ve tried both Safari and Chrome. I’m trying to get ssh to work but I can’t copy/paste keys or get authorized any other way.

Subscribe
Share

as of 2022, i don’t even know how to select text!

but much appreciated for even providing a web console. It’s really handy on my iOS device as the connection stays open, and even re-connects really well! Just need to make the signal functions work…

This comment has been deleted

Friends after ~40 min of frustration trying to copy-and-paste my original password on my first login from my Chromebook, I found an easy solution.

  1. Install the “Secure Shell” chrome extension
  2. run it, enter your droplet’s IP and username as “root”
  3. connect
  4. now for the trick: copy your password as it came on the email, and to paste it do not use CTRL-V but CTRL-SHIFT-V

done!!!


Submit an 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.

Accepted Answer

I got it. I just needed to ssh in as root to set everything up.

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. 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

this is still a problem for me in 2019. How is this like this?

this is still a problem for me in 2019. How is this like this?

I still can’t copy and paste into the console. I need to update my authorized keys and what should take 2 minutes is taking more than an hour, with still no resolution in sight.

Edit: What I ended up doing was copying my id_rsa.pub to a public server, wgeting it to my DO, and then yanking and pasting into ~/.ssh/authorized_keys with vim.

Same problem here: Reversed capitalisation; Cannot Copy/Paste. Why am I having problems I had during the 1980’s on DEC Terminal on a 2400 baud modem? Very frustrating. Just trying to update my authorized_keys since SSH gives “Permission denied (public key)”.

Hey everyone, I am a product manager here at DigitalOcean and I wanted to send a quick update about this issue. We just released the ability to paste text into our Cloud Console! Give it a try and let us know if there is anything else we can help with. Thanks, Keith

Was locked out due to disabling password authentication and Permission denied (publickey).

On a Mac, wrote an AppleScript to type.

In Script Editor located /Applications/Utilities/Script Editor

tell application "System Events"
	set textToType to "ssh-rsa AAAAB..."
	delay 20
	repeat with i from 1 to count characters of textToType
		keystroke (character i of textToType)
		delay 0.6
	end repeat
end tell

Make sure to have ~/.ssh/authorized_keys already open in an editor and in insert mode waiting to type

Press play

After a 20 second delay (hopefully, enough time to change to the console browser window ready for the typing to start) this will type the text inside set textToType to emulating keystrokes

You know how I got this to work after not finding any workable solution?? Logged into console, edited ~/.ssh/authorized_keys using NANO and manually typed out the new ssh key…

@pjpark

If you’re on a MacBook / MacBook Pro, the best option is to use Terminal or Hyper – on Windows, it’s best to use PuTTy.

The console that’s available through the DigitalOcean Control Panel requires that you type in input – you won’t be able to CMD+V or CTRL+V it in.

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. You can refer to the below articles:

https://docs.digitalocean.com/products/droplets/how-to/connect-with-ssh/ https://docs.digitalocean.com/products/droplets/how-to/connect-with-ssh/openssh/ https://docs.digitalocean.com/products/droplets/how-to/connect-with-ssh/putty/

Regards, Alex