配置ssh 服务器
[R2]stelnet server enable //使能stelnet服务
[R2]rsa local-key-pair create //生成服务器密钥对
nput the bits in the modulus[default = 512]:2048 //设置秘钥长度
(新版本已经默认配置,通过display rsa local-key-pair public查看确认)
[R2]aaa //进入aaa试图
[R2-aaa]local-user admin password cipher admin123 //创建用户并配置密码
[R2-aaa]local-user admin privilege level 3 //指定用户级别
[R2-aaa]local-user admin service-type ssh //指定用户类型为ssh用户
[R2-aaa]quit //退出aaa试图
[R2]user-interface vty 0 4 //进入vty用户界面(配置用户最大登陆数量)
[R2-ui-vty0-4]authentication-mode aaa //配置用户认证方式为aaa认证
[R2-ui-vty0-4]protocol inbound ssh //配置vty用户支持的协议(默认情况下支持 ssh和telnet)
[R2-ui-vty0-4]quit //退出vty视图
[R2]ssh user admin authentication-type password //配置ssh用户的认证方式
[R2]quit //退出系统视图
<R2>save //保存
网络设备充当客户端登录ssh:需要添加该命令
ssh client first-time enable