

DigitalOcean have a really good article on generating keys and storing them that I recommend you follow. You need to run puttygen.exe, generate a key with a passphrase, and store the public version of the key on the remote machine. To use the PuTTY tools, you have to use a different key format than the one openSSH creates so I used pretty much this same method to convert my existing key. I’d put this key on GitHub and a few other places so I didn’t want to change it. I generated a key in Rstudio first using openSSH. WinSCP (optional tool, generally helpful)

It is, however, a pain to open PuTTY and log in all the time, mainly because I couldn’t script it in R! It’s been a trial, but like most things it turned out to be pretty simple in the end so I thought I’d share it with you. SSH tunnels are really useful for maintaining remote network integrity and work in a secure fashion. Recently I’ve had to get to grips with SSH tunnels.
