1.修改配置文件

#编辑配置文件
vi /etc/ssh/sshd_config


#更改端口
Port 8182
#允许root登录                         
PermitRootLogin yes
#运行密码认证                
PasswordAuthentication yes

#重启ssh服务
service ssh restart 

更多推荐