Skip to content

Instantly share code, notes, and snippets.

@Lamby777
Created June 19, 2023 09:10
Show Gist options
  • Save Lamby777/8a00ae40fb3054970cc82ee8e2c9da7f to your computer and use it in GitHub Desktop.
Save Lamby777/8a00ae40fb3054970cc82ee8e2c9da7f to your computer and use it in GitHub Desktop.
if ($args.Length -lt 1) {
Write-Host "kid wtf"
return
}
$ipAddress = $args[0]
$command = "type $env:USERPROFILE\.ssh\id_rsa.pub | ssh $ipAddress `"cat >> .ssh/authorized_keys`""
Invoke-Expression -Command $command
@Lamby777
Copy link
Author

Definitely not created by Chat Jippity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment