Created
October 14, 2019 12:43
-
-
Save chanyeinthaw/04af5bc2c6a8c2d817fd1a55c57efe7d to your computer and use it in GitHub Desktop.
SSH copy id script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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