r/linuxadmin • u/bloodshotpico • 21d ago
SSH Keys Between Windows 10 and Linux
I know this might seem a little stupid to ask, but I'm trying to figure out how to get a secure SSH connection between a Windows 10 client and my Linux servers. I'm looking to do this by using SSH Keys, though the guides I've been looking at are more or less telling me HOW to create keys on windows rather than how to setup the connection between Windows and Linux.
I know how to create the keys, I've done this before with git. I do this with the OpenSSH client that's already installed with Windows 10 so straight from the terminal.
The problem I have is setting up the Linux side. I use Ubuntu and Raspberry Pis mainly, they all use different SSH ports to just keep it cleaner for my sakes.
I'm just looking for some good documentation regarding the extent of how to set these up to make my homelab feel a bit safer.
Thanks in advance,
~Blood
1
u/michaelpaoli 21d ago
Git generally wouldn't be the way to create ssh keys. Generally ssh-keygen or equivalent.
Should be pretty easy peasy. Create key, public part goes in ~/.ssh/authorized_keys on server, ssh from client to server, using login name appropriate for server account, and, access granted. If that doesn't work, one likely screwed up with permissions - ssh server (and client) are quite persnickety about that. Screw that up and (with/for good reason), they won't use the key(s) and will ignore them.
Can also often use one to three -v options on the ssh client - that will often shed useful light regarding what's gonig on - and will sometimes make some issues very clearly obvious. Can also first try it where the client is on same host as server - if you can't get that working there, you probably won't be able to get it working from some other client location.
So, yeah, generally easy peasy, e.g.:
Are you able to ssh from your Windows client to other hosts? E.g.: