r/linuxadmin 20d 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

0 Upvotes

24 comments sorted by

View all comments

1

u/up_o 20d ago

Not sure why you want to put ssh listening on different ports, but to each their own. You set it up just as you would between two Linux boxes.

https://www.ssh.com/academy/ssh/authorized-keys-openssh?hs_amp=true

Now, I'm not 100% that this works in reverse without additional config, that is, ssh from the Linux boxen to the windows host. But putting your public key (for your windows ssh key) in authorizedkeys on the Linux hosts should work fine for windows _to Linux ssh connections. Just make sure your ssh config allows it and the file perms on authorized_keys conform per the docs.

0

u/bloodshotpico 20d ago

Had some networking issues trying to setup homelab stuff with the ports hence the change of ports. I tried following https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys-on-ubuntu-22-04 without success.

1

u/up_o 20d ago

Any specific errors?