ubuntu 20.04配置ssh远程服务
1、开启服务
/etc/init.d/ssh start
查看ssh服务状态 sudo service ssh status
正常是active(running)
2、修改ssh登陆配置
sudo vim /etc/ssh/sshd_config
修改以下配置:
33 #LoginGraceTime 2m
34 #PermitRootLogin prohibit-password
35 #StrictModes yes
36 #MaxAuthTries 6
37 #MaxSessions 10
#To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
修改为:
#LoginGraceTime 2m
PermitRootLogin yes
StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
#To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
#PermitEmptyPasswords no
4、重启ssh服务即可
sudo service ssh restart
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)