一、安装ssh的步骤:
1.安装openssh-server
CentOS/Linux系统命令行输入如下命令:
yum install -y openssl openssh-server
2. 修改配置文件
用vim打开配置文件/etc/ssh/sshd_config
将上图的PermitRootLogin
,RSAAuthentication
,PubkeyAuthentication
的设置为YES
3、启动ssh的服务
systemctl start sshd.service
4、设置开机自动启动ssh服务
systemctl enable sshd.service
5、设置文件夹~/.ssh
的访问权限: