#安全 SSH 设置脚本
##介绍 这个脚本是参考文章
制作。能自动实现文中提到的大部分1设置,提高 SSH 的安全性。使用前请仔细阅读上述文章和下面的说明。
##使用
此脚本会禁止 root 远程登入和密码认证,所以使用前请确保有普通用户设置了 PubkeyAuthentication 并且能够 su.
使用 master 分支。使用方法:
sudo sh ./SSS.sh
sudo service ssh restart脚本会备份原来的 /etc/ssh 为 /root/ssh.bak ,重启 ssh 服务前,请仔细检查 sshd_conf,ssh_conf 文件的设置,否则有可能导致无法登入服务器!
由于这个版本的 openssh 不支持某些加密算法,所以请使用 oldOpenSSH 分支。使用方法:
git checkout oldOpenSSH
sudo sh ./SSS.sh
sudo service ssh restart脚本会备份原来的 /etc/ssh 为 /root/ssh.bak ,重启 ssh 服务前,请仔细检查 sshd_conf,ssh_conf 文件的设置,否则有可能导致无法登入服务器!
##注释
#Secure SSH script
##Introduction This script is made according to
It will carry out most settings1 in the aricle to improve the security of openssh. Read the article above and instructions below carefully before you use it.
##Usage
Use master branch:
sudo sh ./SSS.sh
sudo service ssh restartScript will back up original /etc/ssh to /root/ssh.bak ,before you restart ssh service,check sshd_conf and ssh_conf , incorrect settings can block you from logining to your computer!
Use oldOpenSSH branch:
sudo sh ./SSS.sh
sudo service ssh restartScript will back up original /etc/ssh to /root/ssh.bak ,before you restart ssh service,check sshd_conf and ssh_conf , incorrect settings can block you from logining to your computer!
##Footnotes
Footnotes
-
"Secure Secure Shell" 中
Traffic analysis resistance部分没有实现,因为它依赖Tor。 ↩ ↩2