安装SSH
本次远程服务器使用的是Debain系统,使用apt-get install openssl-server
服务状态的启动/状态/停止
systemctl start sshd.service
systemctl status sshd.service
systemctl stop sshd.service
SSH配置文件
需要在/etc/ssh/sshd_config中修改成以下配置:
服务器开启ROOT远程登录:
服务器启用数字证书登录:
配置修改后需要重启服务systemctl restart sshd.service
客户机生成数字证书:
生成的公私钥存在用户目录下的/.ssh文件中: