check a certificate
See a site's TLS certificate, when it expires and who issued it, or the same for a .pem file.
securitynetwork
steps
-
openssl s_client -connect example.com:443 -servername example.com < /dev/null | openssl x509 -noout -dates -subject -issuera site's certificate: dates, name, issuer
-
openssl x509 -in cert.pem -noout -enddatewhen a certificate file expires
-
openssl x509 -in cert.pem -noout -texteverything in it
-
openssl x509 -in cert.pem -noout -checkend 2592000does it expire within 30 days? (exit 1 if so)
-
curl -vI https://example.com 2>&1 | grep -E 'expire|issuer'the same, the quick way
commands used
opensslcurl
Each has a page in lore: lore openssl opens it.
set up an ssh key
Make a key, put it on a server to log in without a password, use a given key, change its passphrase.
change permissions of a folder and everything in it
Give a folder, its subfolders and its files the permissions or the owner they need, without making them open to everyone.
check a file's permissions
See who may read, write and run a file or a folder, and why a path is refused.
copy files to and from a server
Copy a file or a whole folder between this machine and another one over ssh.