How to save a remote server SSL certificate locally as a file

openssl s_client -connect {HOSTNAME}:{PORT} -showcerts

Comments