


What this does is set Read/Write access for the owner, and no access for anyone else. To do that, run the following command from WSL. You need to adjust the permissions on the key file to get this working. Like nearly everything that goes wrong on Linux, this is a permissions issue. Then you will get an error that looks something like this… If you were to try and push something to Github from WSL, it will warn you that it doesn’t recognize the remote host and it will ask you if you want to connect. Make sure you follow the Github instructions above to generate the SSH keys on Windows. Note that if you installed Github desktop, you do not need to setup SSH keys on the Windows side, and the. If you’re not 100% satisfied, you can get your money back – no questions asked.Įxecute the following command to copy the keys from Windows to WSL.


PUTTY SSH KEY FORWARDING FREE
Might I recommend the free Windows Terminal? You’ll love it. Open a terminal instance attached to WSL. You will need to copy that entire folder from Windows, to WSL. The keys are almost always located at c:\Users\\.ssh. To use this same set of keys in WSL, you first need to copy them over. It will walk you through generating the key, starting the agent and then adding your key to Github. Follow the instructions over on Github’s documentation to do this. My recommendation is that you set up SSH on the Windows side first. This means that you would need a set of SSH keys for Linux and one for Windows, ultimately treating your machine as 2 machines instead of one.Ī better solution would be to share the same set of SSH keys between Windows and WSL so that you have one set of keys for one machine. As a developer, this is quite compelling as you can develop for both platforms on both platforms but with only one machine and without having to constantly switch OS’s. The primary value propositions of WSL is that you can have both Linux AND Windows.
PUTTY SSH KEY FORWARDING INSTALL
The problem is that the Linux distro you install in WSL see’s itself as it’s own operating system, and it wants its own set of SSH keys. There’s a good reason for that.Īn SSH key is specific to a machine.
PUTTY SSH KEY FORWARDING HOW TO
I mention in that section that you can share SSH keys between Windows and WSL, but I never showed exactly how to do it. One of the things that I cover in that article is how to get SSH setup in WSL with Github. It doesn't work with the native openssh terminal client, some documentation on that will come shortly.I recently wrote an article for Smashing Magazine that covers how I set up my personal development environment to use the Windows Subsystem for Linux version 2 (WSL 2). Once you add your key to the agent, it will be available for PuTTY, MobaXTerm and XWin32. The main implementation of an ssh-agent on windows is pageant, which is part of PuTTY. If you use an ssh-agent and forward it through the connection, you can very easily then connect to the frontends, without the need to set up a jump-host or an ssh tunnel.Īdditionally, you can also forward the agent to the frontends, if you need to connect to one of the compute nodes (you need to have a job running on it, of course). And even more: The ssh-agent can be forwarded to other machines, so that if you open a new ssh session on a remote machine, the key can be fetched from the agent on your local machine.Īnd to make it a bit more tangible: If you are outside of the GÖNET and cannot use a VPN, you have to go through. The ssh-agent is a tool that can safely store your ssh-keys in memory and serve it when it is needed by an ssh session.
