Skip to main content

How can I copy terminal output from an ssh console and paste it into local windows notepad window

I have ssh'ed into a Linux console using the Cygwin ssh command. after running a command I need to copy several lines of the output and paste them into a windows notepad window.

The problem is that I cannot use the mouse in my ssh session because I am blind, so left-clicking and dragging to the bottom of the area to copy won't work for me.

Are there any keyboard ways to accomplish this?

BTW: I am trying to copy a 3 or 4 line randomly generated activation key for some software which I need to save.

An addition to this question is the command I am running presents this long activation key which actually has to be pasted into a website to generate a token which then has to be pasted into the terminal which is waiting for input after displaying the activation key.

I know I can use the right-click or ctrl+ins keys to paste the token back into the terminal, but I need to get the activation key.

Redirecting to a file won't work because of the second step of the process.

dnraikes
  • 303
  • 2
  • 4
  • 7