Question

How can I copy the text from the console?

Posted September 22, 2014 18.7k views

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,

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.

×
6 answers

Is there an answer to this? Would really appreciate it.

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
  • thank you TonyTsang

    But what I wanted to know is to copy the text from the console of my drople.
    Isn’t there any way to copy the text from the console of my drople?

    Thanks any way^^

    navthink

I use putty in Windows 8.1.. There, in Console Windows top title bar, one needs to right click.. That would open up the menu contain option “copy all”

Note, you dont need to select anything, copy all will copy everything.. Paste that into notepad and form there, take only what you need.

Thanks..

  • Thank you hunky^^

    I can’t connect to my server via ssh client right now.

    Isn’t there any way to copy the text from the console of my drople?

    Thanks any way^^

    navthink

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.

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

Create a requests bin:

https://requestbin.com

And type in the console

data="data to send"

curl -d "$data" -X POST <https://requestbinlink>

And you should see the data in your request bin.

edited by MattIPv4
Submit an Answer