文件位置
- /etc/ssh/sshd_config
指定端口
Port 22禁止root(指所有uid为0的用户)用户远程登录
PermitRootLogin no禁止自定义用户登录
DenyUsers postgres,mysql只允许白名单用户登录
AllowUsers root禁止密码登录同时使用秘钥登录
PasswordAuthenticatio no
PubkeyAuthentication yes #默认开启 Port 22PermitRootLogin noDenyUsers postgres,mysqlAllowUsers rootPasswordAuthenticatio no
PubkeyAuthentication yes #默认开启 info 还没有任何评论,你来说两句呐!