Skip to content

Instantly share code, notes, and snippets.

@nicc777
Created July 6, 2021 04:07
Show Gist options
  • Save nicc777/90d741b0f436230dd41760c572c589b5 to your computer and use it in GitHub Desktop.
Save nicc777/90d741b0f436230dd41760c572c589b5 to your computer and use it in GitHub Desktop.
Windows 10 equivalent to ssh-copy-id

Originally from https://www.chrisjhart.com/Windows-10-ssh-copy-id/ (visited 2021-07-06)

The below is run in Windows PowerShell

Step 1: Create keys (once-off)

ssh-keygen

Step 2: Copy keys (Repeat for every Unix host you login to)

Note: Replace username and unix-host-or-up-addr with the actual values for your environment

type $env:USERPROFILE\.ssh\id_rsa.pub | ssh username@unix-host-or-up-addr "cat >> .ssh/authorized_keys"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment