New Commands added
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
# Public-SSH-Key
|
||||
|
||||
curl https://gitea.patchyfuntimes.com/mistsage2/Public-SSH-Key/raw/branch/main/homelab_pub --output /root/.ssh/authorized_keys && chmod 600 /root/.ssh/authorized_keys
|
||||
|
||||
cat <<EOT >> /etc/ssh/sshd_config
|
||||
PermitRootLogin prohibit-password
|
||||
AuthorizedKeysFile .ssh/authorized_keys
|
||||
Password Authentication no
|
||||
EOT
|
||||
echo "PermitRootLogin prohibit-password" >> /etc/ssh/sshd_config && echo "AuthorizedKeysFile .ssh/authorized_keys" >> /etc/ssh/sshd_config && echo "Password Authentication no" >> /etc/ssh/sshd_config
|
||||
systemctl restart sshd
|
||||
Reference in New Issue
Block a user