加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

华为设备SSH的实施

发布时间:2020-12-14 04:38:52 所属栏目:大数据 来源:网络整理
导读:1.配置设备ip AR1system-view //进入系统视图 [AR1]interface GigabitEthernet 0/0/0 //进入GigabitEthernet 0/0/0接口配置 [AR1-GigabitEthernet0/0/0]ip address 10.0.0.1 30 //配置IP为10.0.0.1/30 [SW1]interface Vlanif 1 //进入vlan1逻辑接口配置[SW1-


1.配置设备ip
<AR1>system-view //进入系统视图
[AR1]interface GigabitEthernet 0/0/0 //进入GigabitEthernet 0/0/0接口配置
[AR1-GigabitEthernet0/0/0]ip address 10.0.0.1 30 //配置IP为10.0.0.1/30

[SW1]interface Vlanif 1 //进入vlan1逻辑接口配置[SW1-Vlanif1]IP address 10.0.0.2 30 //配置IP为10.0.0.2/30测试连通性:[SW1-Vlanif1]ping 10.0.0.1PING 10.0.0.1: 56 data bytes,press CTRL_C to breakReply from 10.0.0.1: bytes=56 Sequence=1 ttl=255 time=90 ms2.配置AR1的SSH[AR1]aaa //进入aaa配置模式[AR1-aaa]local-user zw password cipher 135113 privilege level 15 //创建用户zw,密码为135113,权限级别为15[AR1-aaa]local-user zw service-type ssh //这个用户服务于SSH[AR1]stelnet server enable //开启SSH服务[AR1]ssh user zw authentication-type password //配置SSH用户登录验证方式为密码验证[AR1] rsa local-key-pair create //生成本地密钥The key name will be: Host% RSA keys defined for Host already exist.Confirm to replace them? (y/n)[n]:y //密钥名称为:主机%为主机定义的RSA密钥已经存在。确认更换?(是/否)[否]:是The range of public key size is (512 ~ 2048).NOTES: If the key modulus is greater than 512,It will take a few minutes.Input the bits in the modulus[default = 512]:768 //设置公钥的大小,最低为768位[AR1]user-interface vty 0 4 //进入vty虚拟接口0-4[AR1-ui-vty0-4]authentication-mode aaa //配置登录方式为aaa模式[AR1-ui-vty0-4]protocol inbound ssh //允许登录SSH3.用SW1做客户端连接AR1的SSH服务[SW1]ssh client first-time enable //第一次配置作为SSH客户端登录需要运行此命令[SW1]stelnet 10.0.0.1 //连接到AR1的SSH服务器Please input the username:zw //登录用户名为zwThe server is not authenticated. Continue to access it? [Y/N] :y服务器未通过身份验证。继续访问?Enter password: //输入密码

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读