Linux commands that I don't use very often, and need help remembering the exact syntax.
Because you cannot use telnet because of encryption, use openssl instead:
openssl s_client -connect host.ucsc.edu:443 -state -quiet
then type:
GET / HTTP/1.0 + 2 RETURNs
Check if a port (e.g. 80) is open:
nmap host.ucsc.edu -p 80
Interpreting results | |
---|---|
open | app listening on that port |
filtered | firewall hiding port, cannot infer status |
closed | no app is listening now, but could be |
unfiltered | respond to nmap, but cannot tell whether open or closed |
Alternatively if nmap is not available use:
nc -w 2 -z host.ucsc.edu 80It will only reply if successful.
sslscan --no-failed host.ucsc.edu:443
echo | openssl s_client -connect host.ucsc.edu:443 2>/dev/null | openssl x509 -dates -noout
openssl req -noout -text -in cert.csr openssl x509 -noout -text -in cert.crt
openssl genrsa 2048 > cert.key
openssl req -new -key cert.key > cert.csr
openssl req -x509 -key cert.key -in cert.csr > cert.crt
Install the cert.key and cert.crt files in apache. This key is not password protected so that apache can restart without requiring a prompt. Thus protect the key with suitable permissions.
openssl verify -purpose sslserver -CAfile chain.crt cert.crt
mysql -h mysql_hostname -u db_user -p
dig ucsc.edu axfr | grep as-prod-web-vip70 | sort
If you get disconnected after a few minutes of inactivity when using ssh, add this line to your ssh config file:
ServerAliveInterval 90
On linux, the file is in /etc/ssh/ssh_config; it could be something similar sounding on a Mac or in Windows.