Thursday, 26 November 2020

Back in the day - PuTTY and Windows and RDP

I had an interesting tinker this PM, harking back to a client engagement where we were using PuTTY on Windows to access a bunch of AIX boxen.

In this case, a colleague was running PuTTY on a Windows boxen, via Microsoft's Remote Desktop client, and was trying to work out how to paste text from macOS into the target Unix boxen, via PuTTY.

I setup a Windows 10 VM on one of our hypervisors, and accessed it via RDP,  and downloaded/installed PuTTY

Once I'd connected to an Ubuntu boxen from the PuTTY session, I set out to test the options for copy/paste.

Having proven that I could copy text from the Mac using [cmd][c] and paste it into Notepad.exe on the Windows boxen, using [ctrl][v], I tried/failed to do the same within the PuTTY session.

No matter what I did, paste failed to ... paste, in terms of invoking it via a keyboard shortcut.

Whilst the "right mouse button" action worked for me ( I've got the Apple Magic Mouse 2, so there are actually no buttons - the entire mouse is a button ! ), the keyboard failed ....

I dug around in PuTTY's settings for a while, and then found this: -



Once I changed Ctrl + Shift + [C,V] from No action to System Clipboard : -



it just worked.

In other words, I could, for example, go into Visual Studio Code (VSCode) on my Mac, use [cmd] [a] to select some text e.g. ps auxw and then [cmd] [c] to copy it to the clipboard.

I could then toggle back into the Remote Desktop session, using [cmd] [tab], use [option] [tab] within the RDP session to toggle into the PuTTY session, and hit [shift] [control] [v] to paste it into the PuTTY session: -



So a fair few keystrokes to remember ... but .. SUCCESS!

For the record, I'm running: -


and the remote Windows 10 box has: -



No comments:

Today I Learned - more about Git config

Whilst trying to create a container image from a project on GitHub, I hit an issue with the cloning process of the GH repository ... Specifi...