Skip to content

Instantly share code, notes, and snippets.

@sinamics
Last active October 23, 2022 12:12
Show Gist options
  • Save sinamics/ba01e2dd4dd60f56094088b6d3c3b069 to your computer and use it in GitHub Desktop.
Save sinamics/ba01e2dd4dd60f56094088b6d3c3b069 to your computer and use it in GitHub Desktop.
# Copy SSH Key to Remote Linux Device
# use the below PowerShell one-line command to copy the contents of the id_rsa.pub public key to a remote Linux device.
# Replace the {IP-ADDRESS-OR-FQDN} with the IP address or FQDN (Fully Qualified Domain Name) of the remote Linux device you would like to copy the public key to.
type $env:USERPROFILE\.ssh\id_rsa.pub | ssh {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