Here is some useful commands i use to handle my servers

Convert ssh keys to pem

openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem chmod 700 id_rsa.pem

Update Debian and Ubuntu packages

apt-get update && apt-get dist-upgrade -y && apt-get autoremove --purge -y && apt-get clean