puttyclip dds

Putty clipboard patch

Putty is a free (MIT-licensed) Win32 Telnet and SSH client developed by Simon Tatham (thanks Simon). This page contains a patched version of putty that allows you to remotely print into the Windows clipboard. A tiny shell script, winclip, can utilize this capability to allow remote (e.g. Unix) programs to pipe their output to the local Windows clipboard, or to copy remote files to the Windows clipboard. The following command will for example fill the local Windows clipboard with the listing of the current directory.
ls -l | winclip
The following command will copy the file /etc/motd to the Windows clipboard.
winclip /etc/motd

To configure the patched version of putty to print to the Windows clipboard select "Windows clipboard" under the putty's "Terminal" - "Remote-controlled printing" option.

Note that when this option is enabled, untrusted remote applications that can send output to your remote putty console will also be able to copy text into your Windows clipboard. Catting an untrusted file directly to the remote console can also have the same effect; reading it with a pager like more(1) or less(1) will filter out the embedded remote printing characters. Putty's author considers this a security risk important enough to preclude the incorporation of this patch into the putty code base. I believe that being able to write to the Windows clipboard is no more dangerous than being able to write control characters to the console of the remote machine you are logged in (this is a precondition for writing to the Windows clipboard). It is also no more dangerous than being able to print to a local printer (this functionality is already provided by putty).

See Also

Download

The following pages do not contain navigation links. Following a link will open a new browser window. Diomidis Spinellis home page

Creative Commons License Unless otherwise expressly stated, all original material on this page created by Diomidis Spinellis is licensed under a Creative Commons Attribution-Share Alike 3.0 Greece License.