If it's just a little bit of info that you want to copy just highlight it with your mouse and then paste it where you want.
If you're trying to get a lot of info the screen session can be logged to a file and then you can copy from the file or clean it up a bit and use it for instructions on doing things
You can use a CLI clipboard tool like xsel or pbpaste and the cat utility to grab contents from STDIN. The steps on Linux with xsel are as follows:
Copy text from your screen session into GNU screen's copy buffer.
Run this command within screen: cat | xsel -b
If xsel didn't report any error, now dump screen's copy buffer to STDIN: Ctrl+a+]
Send an EOF to cat to terminate it: Ctrl+d
At this point, the contents of the screen copy buffer should be in your clipboard.
EDIT: As with all X programs, xsel needs to know how to contact your X server in order to access the clipboard. You should have your DISPLAY environment variable set appropriately.
This answer works for only a scenario where your end target is to paste the copied buffer contents immediately.
The simplest way to do this is by splitting your screen into two regions. You can do this by hitting CTRL+a then |'This is not an i. It is the PIPE sign on your keyboard'
Hit CTRL+a then TAB to switch to the second region, CTRL+a then c to create a new session in the second region.
If you want to copy from nano and paste in terminal, open up the file in nano on the left region, hit CTRL+a then ESC, scroll to the start point of your copy location and hit SPACE, select the text by scrolling to the end point and hit SPACE again to mark copy.
Now, all you have to do is hit CTRL+a then TAB to switch to the region on your right and hit CTRL+a then ].
Your text will be written out to the command line. Note that you can also check for hardcopy option if you want to write directly to file.
Exit your ssh terminal session, if you are currently connected to a server.
If you are using XQuartz on Mac OS and xsel on the server. You should update the XQuartz pasteboard settings by selecting Preferences in the xQuartz application menu.
XQuartz settings:
ssh into the remote machine and try run:
xsel -p <<<"THIS IS A TEST".
Press cmd + v and "THIS IS A TEST" should be output.
I wanted a way to do this programmatically similarly to @kungfuspider and tweaked their solution to work for Ubuntu WSL running on Windows.
Setup:
Download win32yank executable and place win32yank.exe somewhere useful (I created a symbolic link to it in /usr/bin with ln -s <path to exe> /usr/bin/win32yank)
Place the following into ~/.screenrc (from @kungfuspider). You might need to modify the command to point to the correct cat and win32yank locations.
Reload ~/.screenrc without killing your session by executing CTRL+a:source ~/.screenrc
How To Use:
Enter copy mode with CTRL+a[
Move around with vim style key movement or arrow keys
Start selecting text by hitting space
Highlight desired text and finish copy by hitting space again, text should now be in your Windows clipboard and can be pasted back to Ubuntu with a right-click.
Note: It is very important to finish copy with a space because that's what the bindkey command is using to map win32yank