Skip to content

Instantly share code, notes, and snippets.

@chanyeinthaw
Created October 14, 2019 12:43
Show Gist options
  • Select an option

  • Save chanyeinthaw/04af5bc2c6a8c2d817fd1a55c57efe7d to your computer and use it in GitHub Desktop.

Select an option

Save chanyeinthaw/04af5bc2c6a8c2d817fd1a55c57efe7d to your computer and use it in GitHub Desktop.
SSH copy id script
param(
[Parameter(Mandatory=$true)][string]$id,
[Parameter(Mandatory=$true)][string]$hostn
)
cat $id | ssh $hostn "cat >> ~/.ssh/authorized_keys"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment