<<<第九单元练习>>>

1.desktop主机中建立用户westos,并设定其密码为westoslinux

 useradd westos//建立用户

 passwd westos//进入密码设定

设定密码不回显示。输入两次就好

2.配置desktop中的sshd服务要求如下:

*)设定sshd服务只允许westos用户可以被访问使用

wKioL1f6RmbiO6nYAAEGjD3Om9I151.png-wh_50

 AllowUser username 意味着只有存在的用户可以登录我的客户端

*)创建westos用户的key认证方式

ssh root@127.25.60.10

The authenticity of host '127.25.60.10 (127.25.60.10)' can't be established.

ECDSA key fingerprint is 55:dd:43:ce:bf:94:dd:91:49:e7:97:29:63:3d:02:02.

Are you sure you want to continue connecting (yes/no)? yes##建立安全传输key

root@127.25.60.10's password:##密码输入没有回显

Last failed login: Fri Oct 7 18:12:11 CST 2015 from 127.25.60.11on ssh:notty

There was 1 failed login attempt since the last successful login.

Last login: Fri Oct 7 18:12:20 2015 from 172.25.60.11

[root@foundation1 ~]####登陆成功

ctrl +d|logout###退出

[root@foundation1 ~]# logout

Connection to 127.25.60.11 closed.

 

[root@localhost ~]# vim /etc/motd ###设定登陆显示字符

 

*)设定westos用户只允许使用key认证方式,屏蔽其系统密码认证方式

 PasswordAurhentication no 表示屏蔽密码认证的方式