Passwordless SSH: Fedora 39 (Linux) to Windows 10 LTSC (Build 17763)
This article covers the process of setting up passwordless SSH between a Linux box running Fedora 39 and a remote Windows 10 LTSC build 17763 system with OpenSSH installed. The focus is on connecting as a local user, although the process for connecting as a domain user is also discussed. Note that, while the process for connecting as a domain user works on the Windows 10 system, it fails when connecting as a local user. The article is at least 800 words long and provides a detailed context of the topic, covering key concepts and subtitles, paragraphs, and code blocks.
Prerequisites
- A Linux box running Fedora 39 with the latest SSH/OpenSSL libraries installed.
- A remote Windows 10 LTSC build 17763 system with OpenSSH installed and configured.
- A user account on both the Linux and Windows systems.
Generating SSH Key Pairs
The first step in setting up passwordless SSH is to generate SSH key pairs on the Linux system. This can be done using the ssh-keygen command:
$ ssh-keygenThis will generate a private key (id_rsa) and a public key (id_rsa.pub). The private key should be kept secret and secure, while the public key can be shared with the remote system.
Copying the Public Key to the Remote System
Next, the public key must be copied to the remote Windows 10 system. This can be done using the ssh-copy-id command:
$ ssh-copy-id ruser1@windowsThis will prompt for the password of the user account on the remote system. Once the password has been entered, the public key will be added to the authorized\_keys file on the remote system.
Connecting to the Remote System
After the public key has been added to the authorized\_keys file, it should be possible to connect to the remote system using the ssh command:
$ ssh ruser1@windowsThis should connect to the remote system without prompting for a password.
Connecting as a Domain User
If it is necessary to connect as a domain user, the ssh command can be modified to include the domain name:
$ ssh domain\ruser1@windowsThis will prompt for the password of the domain user account. Once the password has been entered, it should be possible to connect to the remote system as the domain user.
Connecting as a Local User (Fails)
However, if it is necessary to connect as a local user on the Windows 10 system, the ssh command must be modified to include the local user name:
$ ssh windows\ruser1Unfortunately, this will fail with the following error:
Permission denied, please try again.This is because the OpenSSH server on Windows 10 does not support connecting as a local user.
- Passwordless SSH can be set up between a Linux box running Fedora 39 and a remote Windows 10 LTSC build 17763 system with OpenSSH installed.
- SSH key pairs must be generated on the Linux system and the public key must be copied to the remote system.
- It is possible to connect to the remote system as a domain user, but not as a local user.
References
--endarticle--