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
-
My Outwit tool suite
provides access to the Windows clipboard,
registry, databases, document properties, and links from the
Windows command-line console.
It includes a winclip program that you can use from your
local Windows console.
The outwit winclip command interacts directly
with the Windows clipboard and does not require putty.
- DoIt
is a program the author of putty wrote to do various
things along the line described in this page in a more secure manner.
It supports the clipboard functionality implemented here,
along with a load of other handy Windows functions one might reasonably want to
invoke from a Unix machine connected to from a Windows desktop.
Download
The following pages do not contain navigation links.
Following a link will open a new browser window.
- puttyclip.diff Unified context diff against putty version 0.53b.
- Putty license
- puttyclip.exe The patched putty executable (based on version 0.53b).
- winclip A Unix shell script that send its standard input or specified files to the Windows clipboard.
Diomidis Spinellis home page