Skip to content

Instantly share code, notes, and snippets.

@rizkysyazuli
Last active November 5, 2022 06:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rizkysyazuli/8c21eb08ed37df3af8865839f4eea647 to your computer and use it in GitHub Desktop.
Save rizkysyazuli/8c21eb08ed37df3af8865839f4eea647 to your computer and use it in GitHub Desktop.
[Shell - HTTP] Useful http & web related commands
# Download the SSL certificate from a website
echo | openssl s_client -servername NAME -connect HOST:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > FILENAME.cer
# copy ssh keys to remote server
ssh-copy-id remote_username@server_ip_address
# output recent server log
# https://explainshell.com/explain?cmd=tail+-f+%2Fpath%2Fto%2Flogs%2Ferror.log+%7C+grep+%27string%27
tail -f /path/to/logs/error.log | grep 'string'
cat /path/to/logs/error.log | grep 'string'
# check HTTP header
curl -IL mysite.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment