要求:开启SSH服务,用户名密码分别为admin、admin1234;特权密码为admin,密码为明文类型。
步骤1:开启SSH服务功能。
SW1(config)#enable service ssh-server
步骤2:生成加密密钥。
SW1(config)#crypto key generate dsa Choose the size of the key modulus in the range of 360 to 2048 for your Signature Keys. Choosing a key modulus greater than 512 may take a few minutes. How many bits in the modulus [512]: //直接回车 % Generating 1024 bit DSA keys ...[ok] SW1(config)#
步骤3:开启用户名+密码验证。
SW1(config)#username admin password admin1234 # 明文密码 SW1(config)#enable password admin # 密文密码 SW1(config)#enable secret admin SW1(config)#line vty 0 4 SW1(config-line)#login local SW1(config-line)#end
步骤4:打开SecureCRT软件,选择快速连接,协议选择SSH2,主机名输入SW1的IP地址。
步骤5:查看SSH配置。
1.使用show ssh命令查看ssh服务的状态。
SW1#show ssh
2.查看当前登入的用户。
SW1#show users



