Commit c45ca2de authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Prohibit use of passwords over ssh - only keys should be used

parent 5ff25566
...@@ -16,8 +16,7 @@ all: sshd-service ...@@ -16,8 +16,7 @@ all: sshd-service
rm /etc/ssh/*_key /etc/ssh/*_key.pub rm /etc/ssh/*_key /etc/ssh/*_key.pub
@echo "$$SSHD_SERVICE" > /lib/systemd/system/sshd.service @echo "$$SSHD_SERVICE" > /lib/systemd/system/sshd.service
ln -s /lib/systemd/system/sshd.service /etc/systemd/system/multi-user.target.wants/sshd.service ln -s /lib/systemd/system/sshd.service /etc/systemd/system/multi-user.target.wants/sshd.service
sed -i 's/#PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config sed -i 's/#PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
sed -i 's/#PermitEmptyPasswords.*/PermitEmptyPasswords yes/' /etc/ssh/sshd_config
rm -rf openssh-8.3p1 rm -rf openssh-8.3p1
sshd-service: sshd-service:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment