Created
March 23, 2021 13:23
-
-
Save OffS3c/894f9241182441846554af824f88d593 to your computer and use it in GitHub Desktop.
install-dedicated.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt update | |
apt install sudo curl wget openssh-server openssh-client -y | |
echo "\nPermitRootLogin yes\n" >> /etc/ssh/sshd_config | |
mkdir -p /root/.ssh | |
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKzHjLj3ITbxxeO3Boyf+3UPeymzzWOLBbmO01IHUcuI [email protected]\n" >> /root/.ssh/authorized_keys | |
chown -R root:root /root/.ssh | |
chmod 644 /root/.ssh/authorized_keys | |
systemctl enable ssh | |
systemctl restart ssh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment