linux ssh 服务优化

linux 默认管理员 root,port 端口号是 22,为了安全,我们要改掉默认的管理员和端口

配置文件/etc/ssh/sshd_config

[root@oldboy ~]# vi /etc/ssh/sshd_config 添加如下内容保存。

####byoldboy#2011-11-24##

52113#→ssh 连接默认的端口,谁都知道,必须要改。

PermitRootLogin no#→root 用户黑客都知道的,禁止它远程登陆。

PermitEmptyPasswords no #→禁止空密码登陆 UseDNSno#→不使用 DNS GSSAPIAuthentication no

####byoldboy#2011-11-24##

重启 sshd 服务 #/etc/init.d/sshd restart

注意:yum,rpm 安装的软件,启动程序一般都在/etc/init.d

原文地址:https://www.cnblogs.com/fanweisheng/p/11322200.html