Report this

What is the reason for this report?

How can I copy the text from the console?

Posted on September 22, 2014

Hi ^^ I was trying to copy the results of the following command: cat ~/.ssh/id_rsa.pub

But I can’t copy the results from the console.

How can I copy the text from the console?

Thank you navthink,



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!

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.
  • Bring up the console in the browser developer tools.
  • In console tab, paste this snippet and hit ENTER
!function(){function t(){window.rfb.sendKey(e.shift().charCodeAt()),e.length>0&&setTimeout(t,10)}var e=prompt("Enter text to be sent to console").split("");t()}();
  • You’ll receive a dialog prompt to enter the copy to paste in.

Please note that you need to click on the VNC console and hit enter to execute the command.

If you can ssh to your server, you can use sftp to download the file.

Otherwise you may try to mail the file with mail command

sudo apt-get install mailutils
mail -s "My pub key" someone@domain.com < ~/.ssh/id_rsa.pub

I’m actually needing to know the same thing. How can I copy the consoul log or at least get access to it? I can connect via ssh by the way.

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.