-
Notifications
You must be signed in to change notification settings - Fork 803
Description
Summary of the new feature / enhancement
The ssh-copy-id utility is a widely-used tool on Unix-like systems for simplifying the process of copying a user’s public SSH key to a remote server’s authorized_keys file. Currently, OpenSSH for Windows/PowerShell does not include ssh-copy-id, which results in a more manual and error-prone process for setting up passwordless SSH authentication on Windows.
Benefits of Adding ssh-copy-id
1. Simplified Workflow
ssh-copy-id automates the process of appending the user’s public key to the remote server’s authorized_keys file. This reduces the need for manual file transfers and editing, thus saving time and reducing complexity.
2. Improved User Experience
Users familiar with OpenSSH on Linux/macOS expect ssh-copy-id to be available. Providing this tool on Windows ensures a consistent experience across platforms and lowers the learning curve for users transitioning between operating systems.
3. Fewer Errors and Increased Security
Manual copying of public keys can lead to errors such as incorrect file permissions or accidental overwrites. ssh-copy-id handles permissions and appends keys correctly, improving security and reliability.
4. Scripting and Automation
Having ssh-copy-id available makes it easier to script key deployment in Windows-based automation scenarios, such as CI/CD, infrastructure provisioning, and remote administration.
Use Case Example
Current (manual) process on Windows:
- Generate SSH key pair with
ssh-keygen. - Manually copy the contents of the public key file.
- SSH into the remote server and paste the key into
~/.ssh/authorized_keys.
Proposed (with ssh-copy-id) process:
- Generate SSH key pair with
ssh-keygen. - Run
ssh-copy-id user@remote-hostfrom PowerShell or CMD to automate the rest.
Proposed technical implementation details (optional)
No response