Created
August 10, 2017 12:05
-
-
Save lyret/ae048119e0114fe796d840c4240df890 to your computer and use it in GitHub Desktop.
Replace a SSH key on a linux server
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
sed -i '\|OLDKEY|d' .ssh/authorized_keys && echo "NEWKEY" >> .ssh/authorized_keys |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment