Skip to content

Instantly share code, notes, and snippets.

@arupgsh
Last active November 9, 2021 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arupgsh/8b073ac95a2a50782e6753bccbbb21c6 to your computer and use it in GitHub Desktop.
Save arupgsh/8b073ac95a2a50782e6753bccbbb21c6 to your computer and use it in GitHub Desktop.
PowerShell SSH-COPY-ID allternative

Passwordless ssh from PowerShell

Source: https://www.chrisjhart.com/Windows-10-ssh-copy-id/

  • Generate SSH Key
ssh-keygen.exe 

Hit enter a couple of time to use the default settings.

Type the follwoing command to append the public key to remote hosts authorized_keys file.

type $env:USERPROFILE\.ssh\id_rsa.pub | ssh {USERNAME}@{IP-ADDRESS-OR-FQDN} "cat >> .ssh/authorized_keys"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment