How to Set Up SSH Keys Between Windows 10 and Linux?

0
5
Asked By TechWiz74 On

I'm trying to establish a secure SSH connection between my Windows 10 machine and my Linux servers using SSH keys. Although I've created keys before using the OpenSSH client on Windows, I need guidance on configuring the Linux side of things, particularly for my Ubuntu and Raspberry Pi devices which operate on different SSH ports. I'm looking for comprehensive documentation or steps to make sure this setup enhances the security of my homelab. Any help would be appreciated!

6 Answers

Answered By LinuxGuru52 On

If you're setting SSH on different ports, you should treat it like any other SSH connection between two Linux machines. Placing your public key in the `authorized_keys` file should work fine for Windows to Linux SSH connections. Just ensure the SSH config is set correctly. Here's a resource for more info: https://www.ssh.com/academy/ssh/authorized-keys-openssh?hs_amp=true

BloodshotPico -

I changed the ports because I faced networking issues, but setting it up like this should help!

Answered By DevOpsDude On

Creating the keys with Git isn't recommended. Normally, you would use `ssh-keygen`. Then, just make sure to copy the public part to the `authorized_keys` on your server. If you're adamant about using different ports, ensure your SSH config is allowing that. It may require permissions adjustments to work efficiently.

Answered By SCPadawan On

You can use `scp` to transfer your public keys the long way; here's how:

```
scp C:UsersUser.ssh*.pub user@hostname:/home/user/
```
And don't forget you can create a config file in your `.ssh` folder on Windows for easier access.

Answered By SecureConnectX On

Just a heads up, using different ports for SSH might complicate things without offering much benefit. You can use `ssh-copy-id` to copy your public key to your Linux server, simplifying the setup. Make sure your `sshd_config` is set up correctly and check your file permissions on the `authorized_keys` file as well.

Answered By NetworkingNinja On

Are you just trying to generate keys? You can use this command: `ssh-keygen`. Also, for specific configurations, consider using a `known_hosts` file to manage settings per host.

Answered By CodeMaster99 On

To link your Windows machine with the Linux server, make sure you copy the public key to the server using a command like this:

```
Windows:
scp -P .ssh/*.pub username@remote:
Linux:
cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys
```
That should do the trick!

UserGeek101 -

Great advice, makes it straightforward!

SimpleTechie -

Yep, this will work nicely!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.