• 华为交换机配置ssh登录远程管理交换机


    配置华为交换机ssh远程登录,先配置交换机的管理地址和vlan,此处为vlan10 ,把接口GE0/0/1划入vlan10,管理地址为192.168.10.100/241、创建本地密钥对

    配置接入交换机ssh

    一、配置管理地址和接口vlan
    [SW1]vlan 10
    [SW1]interface vlan 10
    [SW1-Vlanif10]ip address 192.168.10.100 24

    [SW1]interface GigabitEthernet 0/0/1
    [SW1-GigabitEthernet0/0/1]port link-type access
    [SW1-GigabitEthernet0/0/1]port default vlan 10

    二、开启stelnet权限
    [SW1]stelnet server enable

    三、创建本地密钥对
    [SW1]rsa local-key-pair create

    四、创建ssh用户名为user
    [SW1]ssh user user //创建用户
    [SW1]ssh user user authentication-type password //创建用户认证为密码认证
    [SW1]ssh user user service-type stelnet //服务类型为ssh

    五、进入aaa模式下配置用户

    [SW1]aaa //进入aaa模式
    [SW1-aaa]local-user user password cipher user123 //配置用户密码为user123
    [SW1-aaa]local-user user privilege level 15 //配置用户权限级别
    [SW1-aaa]local-user user service-type ssh //允许用户ssh访问权限

    六、配置vty界面支持的登录协议
    [SW1]user-interface vty 0 4
    [SW1-ui-vty0-4]authentication-mode aaa //认证为aaa
    [SW1-ui-vty0-4]protocol inbound ssh //登录协议为ssh登入

    七、登录ssh管理
    通过xshell等工具登录
     

    配置核心交换机ssh

    1、创建本地密钥对

    [Core-SW]rsa local-key-pair create
    The key name will be: Core-SW_Host
    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 = 2048]:
    Generating keys...
    ..+++++
    ........................++
    ....++++
    ...........++
    2、检查是否存在SSH user(可跳过),系统提示没有SSH user 存在

    [Core-SW]dis ssh user-information
    Info: No SSH user exists.
    3、创建SSH user

    [Core-SW]ssh user test \可以直接敲第二行命令
    [Core-SW]ssh user test authentication-type password \认证模式为密码认证
    [Core-SW]ssh user test service-type stelnet \服务类型为stelnet,即SSH
    4、创建用户

    [Core-SW]aaa
    [Core-SW-aaa]local-user test password cipher xxx(xxx处为你想要设置的密码)
    Info: Add a new user.
    [Core-SW-aaa]local-user test privilege level 3 \用户level最高到15
    [Core-SW-aaa]local-user test service-type ?
    8021x 802.1x user
    bind Bind authentication user
    ftp FTP user
    http Http user
    ppp PPP user
    ssh SSH user
    telnet Telnet user
    terminal Terminal user
    web Web authentication user
    x25-pad X25-pad user
    [Core-SW-aaa]local-user test service-type ssh \开启该用户允许使用SSH访问设备的权限
    5、启用SSH(stelnet)服务

    [Core-SW]stelnet server enable
    Info: Succeeded in starting the Stelnet server.
    6、配置vty界面支持的登录协议

    [Core-SW]user-interface vty 0 4
    [Core-SW-ui-vty0-4]authentication-mode aaa
    [Core-SW-ui-vty0-4]protocol inbound ssh

  • 相关阅读:
    【UML用户指南】-31-对体系结构建模-制品图
    SpringBoot使用AOP记录接口操作日志
    正则表达式在Java中的使用
    水儿的绘画——dfs连通块+暴力枚举
    箭头函数写法
    centos安装kingbase(人大进仓)数据库
    【每日一题】矩形重叠个数
    协议-TCP协议-基础概念02-TCP握手被拒绝-内核参数-指数退避原则-TCP窗口-TCP重传
    kettle基础使用教程
    Android终于要推出Google官方的二维码扫描库了?
  • 原文地址:https://blog.csdn.net/jayjaydream/article/details/125569027