Last active
November 5, 2024 06:54
-
-
Save elonmallin/2cc94c45ab57e2060498e855acefade0 to your computer and use it in GitHub Desktop.
One-liner ssh-keygen and ssh-copy-id for Windows powershell
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
ssh-keygen && cat $env:userprofile/.ssh/id_rsa.pub | ssh user@linuxserver 'cat >> .ssh/authorized_keys' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since google took me here when searching for a powershell ssh-copy-id, I thought I'd share my modifications to the above which allows for configurable host and uses default ssh pub key as well as ensuring permissions are correct (I just stick this in my profile script):
Thank you very much for sharing this!