Once in a while, I need to use Putty on Windows to connect to a guest Linux installation in VirtualBox for things that aren’t compatible with Cygwin. However, a slight annoyance is that I can’t copy, say, a whole file to the Windows clipboard.
However, the putty version provided is outdated, and does not support some new cipher standards. Shortly after, I realized the Putty fork I had been using, KiTTY, has the patch included.
With the client set up properly, the only thing left is to write a script on the remote box that sends the ANSI codes.
Which can then be called by
[scriptName] [textFile] or
cat [textFile] | [scriptName]. However, this does not work on Tmux. A solution is the following:
This creates some escape codes at the beginning of the content, which look positioning related. I have no idea on how to remove them, but manually deleting them (at least for my usage) isn’t that much of a problem.