Last active
September 6, 2023 17:57
-
-
Save Alistair1231/a90c10c5906df286c8a0247a20932499 to your computer and use it in GitHub Desktop.
ssh-copy-id windows
This file contains 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
# just copy/paste into powershell and edit variables before pressing enter. | |
$user="user"; ` | |
$server="example.com"; ` | |
$port=22; ` | |
$file="id_rsa"; ` | |
type $env:USERPROFILE\.ssh\$file.pub | ssh $user@$server -p $port "mkdir -p ~/.ssh && cat >> .ssh/authorized_keys" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment