Save server certificate to your local machine using bash
To save a server certificate to your local machine, we can use openssl and read from the https port 443 and save it using echo. Save the above script to a file called save_server_script.sh and give permissions. Run the script and open the directory to see the .crt file getting saved.