two white printer papers near macbook on brown surface
Linux Windows

Transfer files using the RDP clipboard when it’s blocked.

Afternoon, Morning and Evening depending on when you are reading this. I’ve come across this one recently and thought I would post it.

You know those situations where you need to copy a file from a machine, but can’t as it’s blocked in RDP, but you can still copy text through RDP. Well, you still can copy files as well. here’s how.

To work around this:-

  1. Encode the contents of a file.
  2. Copy the contents over to the destination.
  3. Decode the text file back to the correct format.

Source machine is Linux
1. base64 <> <destfile.txt>

2. Open destfile.txt and copy the contents to the clipboard (can take some time depending on the size)

Destination machine is Windows

  1. Open Notepad, and paste content in. Save destfile.txt
  2. Open Command Prompt and navigate to the file location.
  3. Use Certuitl -decode destfile.txt

For the reverse

  1. Certutil -encode destfile.txt
  2. Copy contents over
  3. base64 -d destfile.txt

Job Done!