1.vim /etc/ssh/sshd_config
配置如下图:
2.systemctl reload sshd.service (针对阿里云centos7(貌似阿里云的都是这样) 其他别的服务器使用:service sshd reload
两行命令搞定。
尽量使用我的方法(首荐),如果觉得不好,可以使用下面的:
其他参考链接:https://blog.csdn.net/quqi99/article/details/51434248(次荐)
https://blog.csdn.net/Jalon2015/article/details/50222051