mkdir ~/.ssh
cat << EOF > ~/.ssh/authorized_keys
"id_rsa.pub 数值"
EOF
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
echo "Port 740" >> /etc/ssh/sshd_config
echo "Protocol 2" >> /etc/ssh/sshd_config
echo "LoginGraceTime 30" >> /etc/ssh/sshd_config
echo "PermitRootLogin without-password" >> /etc/ssh/sshd_config
echo "MaxAuthTries 3" >> /etc/ssh/sshd_config
firewall-cmd --permanent --zone=public --add-port=740/tcp
...
1
pH 2015-07-17 19:03:06 +08:00
咋了。这些命令是你操作的还是别人操作的。
|
3
vibbow 2015-07-17 20:59:14 +08:00
哦
|
4
msg7086 2015-07-18 07:13:16 +08:00
不能理解为什么装系统不装fail2ban
|