Last active
August 31, 2016 21:00
-
-
Save Kyle-Falconer/cb5420340e7a08da983cfc7d99aaa241 to your computer and use it in GitHub Desktop.
Upload and append public key to remote computer's authorized_keys
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
| #/bin/sh | |
| # if you need a new public/private key pair, use: | |
| # ssh-keygen | |
| scp ~/.ssh/id_rsa.pub user@example.com:/home/user/.ssh/uploaded_key.pub | |
| ssh user@example.com "echo `cat ~/.ssh/uploaded_key.pub` >> ~/.ssh/authorized_keys" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment