作业 第九章
2016-10-10 17:53
155 查看
<<<第九单元练习>>>1.在desktop主机中建立用户westos,并设定其密码为westoslinuxuseradd westospasswd westos输入两次westoslinux2.配置desktop中的sshd服务要求如下:*)设定sshd服务只允许westos用户可以被访问使用*)创建westos用户的key认证方式*)设定westos用户只允许使用key认证方式,屏蔽其系统密码认证方式vim /etc/ssh/sshd_configAllowusers westos 加入:wqsystemctl restart sshdssh-keygencd /root/.ssh/ssh-copy-id -i id_rsa.pub westos@172.25.15.10vim /etc/ssh/sshd_configPasswordAuthentication no 78行加入:wqsystemctl restart sshd