Created
February 13, 2019 13:48
-
-
Save udkyo/a89099b1c84fa96ac7a076f880851207 to your computer and use it in GitHub Desktop.
nc webserver
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
# I use this for quickly getting SSH pub keys from one host to another in the lab | |
# when I've provisioned them an awkward way, running this and then something along the lines of | |
# mkdir ~/.ssh && chmod 755 ~/.ssh && curl [host_with_key] >> ~/.ssh/authorized_keys | |
while true; do nc -l -p 1500 -c 'echo -e "HTTP/1.1 200 OK\n\n$(cat ~/.ssh/id_rsa.pub)"'; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment