zoukankan      html  css  js  c++  java
  • 配置SSH远程登录

     R1配置

    <Huawei>sys
    Enter system view, return user view with Ctrl+Z.
    [Huawei]int g0/0/0
    [Huawei-GigabitEthernet0/0/0]ip add 12.1.1.1 21
    May 16 2020 22:43:48-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
     IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
    [Huawei-GigabitEthernet0/0/0]q    
    [Huawei]ssh client first-time enable 
    [Huawei]

    R2配置

    <Huawei>sys
    Enter system view, return user view with Ctrl+Z.
    [Huawei]sys AR2  

    [AR2]interface GigabitEthernet 0/0/0
    [AR2-GigabitEthernet0/0/0]ip addr 12.1.1.2 24

    [AR2]stelnet server enable 
    Info: Succeeded in starting the STELNET server.
    [AR2]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
    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]:2048
    Generating keys...
    ...........................................+++
    ................................................................+++
    .........................++++++++
    ...........++++++++
    [AR2]aaa
    [AR2-aaa]local-user user-ssh password cipher huawei123 privilege level 15 idle-t
    imeout 300
    [AR2-aaa]local-user user-ssh service-type ssh
    [AR2]user-interface vty 0 4
    [AR2-ui-vty0-4]authentication-mode aaa
    [AR2-ui-vty0-4]protocol inbound ssh 
    [AR2]ssh user user-ssh authentication-type all
    定义ssh用户的认证模式

    测试

    [Huawei]stelnet 12.1.1.2
    Please input the username:user-ssh
    Trying 12.1.1.2 ...
    Press CTRL+K to abort
    Connected to 12.1.1.2 ...
    Enter password:
      ----------------------------------------------------------------------------- 
        
      User last login information:     
      -----------------------------------------------------------------------------
      Access Type: SSH      
      IP-Address : 12.1.1.1 ssh     
      Time       : 2020-05-16 22:57:15-08:00     
      -----------------------------------------------------------------------------
    <AR2>
  • 相关阅读:
    C#处理Json文件
    asp.net ToString()格式汇总
    通过一段代码说明C#中rel与out的使用区别
    EnterpriseLibrary4 自己封装程序集实现log打印
    Logger日志打印普通方法
    后台代码对iBatis配置文件中具体的sql语句的调用实现(被封装的增删改查)
    Cryptography加密和解密
    GETorPOST方式保存和获取图片信息
    Response响应请求操作
    图片的读取和保存操作
  • 原文地址:https://www.cnblogs.com/liujunjun/p/12902704.html
Copyright © 2011-2022 走看看