Add SSH Key

This commit is contained in:
mshillam 2022-02-19 22:05:08 +00:00
parent a1500a80b7
commit 4c024ef798
1 changed files with 9 additions and 9 deletions

View File

@ -33,10 +33,10 @@ apt update && apt dist-upgrade -y
echo "- Install Packages."
apt install ifupdown2 sasl2-bin mailutils libsasl2-modules curl -y
echo "- Adding SSH Key - Bennell IT..."
echo "- Adding SSH Key - Matthew Shillam..."
mkdir -p ~/.ssh
touch ~/.ssh/authorized_keys
echo ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAkXk0+tC1ZMiWgTQvE/GeB9+TuPWTf8mr9zVOYdNhF+KFXxc/DjMjIPNCAUxtQErlush1GF87b7gaEIC2F5p/+xr39gnt5panjT2AJmVQm9GrSc0LwZOHducgB9SeW7F6A2hA0dtEDxOPHC88ipT9qvTZdeC+mgoNmyIAIMmnPVcZOqQm7iVUf3kJCRWVGI/csE1UYpZ1tLpkaNqjP0Iy7cQvNgodJWh8Mg//TD6ESKBQ35P3+6zT2zEpIK/hQ5eaW5Uu82kSt1ZGuNaPukfCra0cjWr2n4hC+C3E9m3K/3ZV43usaxwSbPa6R/jJE4fyqpC2hqdTKW8Z66mVTC8EpQ== Bennell IT >> ~/.ssh/authorized_keys
echo ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEcFjKOC+TWLurU/q/JQUbMP0AfNaUTWWXe2zy8BDs2v matthew@shillam.me.uk >> ~/.ssh/authorized_keys
chmod -R go= ~/.ssh
#echo "- Setting up smtp for email alerts"
@ -62,14 +62,14 @@ chmod -R go= ~/.ssh
#chmod 644 /etc/postfix/sender_canonical /etc/postfix/sender_canonical.db
#service postfix restart
Serverfqdn=$(hostname -f)
IP=$(hostname -I)
#Serverfqdn=$(hostname -f)
#IP=$(hostname -I)
echo "to: server@bennellit.com.au" >> /etc/postfix/emailsetupinfo.txt
echo "subject:New Server Setup Info $Serverfqdn" >> /etc/postfix/emailsetupinfo.txt
echo "Hostname: $Serverfqdn" >> /etc/postfix/emailsetupinfo.txt
echo "IP Address: $IP" >> /etc/postfix/emailsetupinfo.txt
#echo "to: server@bennellit.com.au" >> /etc/postfix/emailsetupinfo.txt
#echo "subject:New Server Setup Info $Serverfqdn" >> /etc/postfix/emailsetupinfo.txt
#echo "Hostname: $Serverfqdn" >> /etc/postfix/emailsetupinfo.txt
#echo "IP Address: $IP" >> /etc/postfix/emailsetupinfo.txt
sendmail -v server@lab-network.xyz < /etc/postfix/emailsetupinfo.txt
#sendmail -v server@lab-network.xyz < /etc/postfix/emailsetupinfo.txt
echo "- done!"