首页 > 其他分享 >华为配置案例1:配置远程登录交换机

华为配置案例1:配置远程登录交换机

时间:2023-06-12 21:32:58浏览次数:56  
标签:AR1 aaa 配置 192.168 server 华为 交换机 user ssh

1.使用Telnet访问华为设备

华为配置案例1:配置远程登录交换机_交换机


(1)配置telnet登录

真机上需要先启用telnet服务

[AR1]telnet server enable

1 password认证

AR1配置telnet

[AR1]user-interface vty 0 4

[AR1-ui-vty0-4]authentication-mode password

Please configure the login password (maximum length 16):6

[AR1-ui-vty0-4]set authentication password cipher huawei

[AR1-ui-vty0-4]user privilege level 15

AR2 telnet 登录AR1

<AR2>telnet 192.168.1.1

Press CTRL_] to quit telnet mode

Trying 192.168.1.1 ...

Connected to 192.168.1.1 ...


Login authentication


Password:huawei

成功登陆AR1

<AR1>

2 aaa认证

AR1配置telnet

[AR1]user-interface vty 0 4

[AR1-ui-vty0-4]authentication-mode aaa

[AR1-ui-vty0-4]quit

[AR1]aaa

[AR1-aaa]local-user admin password cipher huawei

[AR1-aaa]local-user admin privilege level 15

[AR1-aaa]local-user admin service-type telnet

AR2 telnet 登录AR1

<AR2>telnet 192.168.1.1

Press CTRL_] to quit telnet mode

Trying 192.168.1.1 ...

Connected to 192.168.1.1 ...


Login authentication


Username:admin

Password:huawei

成功登陆AR1

<AR1>

2.使用SSH访问华为设备

华为配置案例1:配置远程登录交换机_交换机_02


(1)服务端配置ssh登录

1创建SSH用户及密码

[AR1]aaa

[AR1-aaa]local-user admin password cipher huawei privilege level 15

[AR1-aaa]local-user admin service-type ssh

[AR1-aaa]quit

2配置ssh用户的认证方式

[AR1]ssh user admin authentication-type password

Authentication type setted, and will be in effect next time

3开启ssh服务

[AR1]stelnet server enable

Info: Succeeded in starting the STELNET server.

查看SSH 服务状态

[AR1]display ssh server status

SSH version :1.99

SSH connection timeout :60 seconds

SSH server key generating interval :0 hours

SSH Authentication retries :3 times

SFTP Server :Disable

Stelnet server :Enable

4生成本地密钥对

[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

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]:回车

Generating keys...

.........++++++++++++

........................++++++++++++

.................................++++++++

........++++++++

5配置VTY用户界面

[AR1]user-interface vty 0 4

[AR1-ui-vty0-4]authentication-mode aaa

[AR1-ui-vty0-4]protocol inbound ssh

(2)客户端配置ssh登录

首次ssh登录使用如下命令,开启ssh client功能

[AR2]ssh client first-time enable

[AR2]stelnet 192.168.1.1

Please input the username:admin

Trying 192.168.1.1 ...

Press CTRL+K to abort

Connected to 192.168.1.1 ...

The server is not authenticated. Continue to access it? (y/n)[n]:y

Feb 24 2021 21:20:41-08:00 AR2 %%01SSH/4/CONTINUE_KEYEXCHANGE(l)[0]:The server h

ad not been authenticated in the process of exchanging keys. When deciding wheth

er to continue, the user chose Y.

[AR2]

Save the server's public key? (y/n)[n]:y

The server's public key will be saved with the name 192.168.1.1. Please wait...


Feb 24 2021 21:20:46-08:00 AR2 %%01SSH/4/SAVE_PUBLICKEY(l)[1]:When deciding whet

her to save the server's public key 192.168.1.1, the user chose Y.

[AR2]

Enter password:huawei

成功登陆AR1

<AR1>


标签:AR1,aaa,配置,192.168,server,华为,交换机,user,ssh
From: https://blog.51cto.com/u_14232993/6465575

相关文章

  • 华为云618活动来袭,精选CDN和视频云产品限时低价秒杀0.6折起
    华为云618,年中业务添动力,选择华为云更省心!选择一个优质的CDN服务成为了企业的应对产品运营的关键一步。华为云CDN运用创新型运营模式,合规化全国运营,提供高标准服务保障,并通过持续的技术创新能力为CDN服务构建了深邃的“护城河”,提供优质CDN节点服务,广泛服务于视频、游戏、电商、金......
  • sshd服务端配置
    目录sshd服务端配置文件:/etc/ssh/sshd_config参数说明:sshd客户端配置客户端配置文件客户端配置文件:/etc/ssh/ssh_config客户端的使用方式远程登录推送上行复制拉取下行复制sftp命令sftp命令格式:sftp连接后的常用命令:sftp和ftp的区别:免密码登录认证方式设置免密码登录(创建密钥对......
  • CJJC项目实验环境配置
    CJJC项目实验环境配置 (base)D:\>(base)D:\>condacreate-nwind_2022python==3.7Solvingenvironment:done##PackagePlan##environmentlocation:D:\Anaconda3\envs\wind_2022added/updatedspecs:-python==3.7Thefollowingpackages......
  • 在docker环境下配置php以及swole并创建hyperf项目
    在上篇文章中说了在linux环境下安装php8.2以及swoole扩展的问题,只是很多时候我们的环境都是在windows下进行的,但是在windows中安装swoole太麻烦了。这时候就到了我们的docker出场的时候了。首先docker的安装,这个网上到处都是,就不多赘述了,贴一个docker官网地址:https:docker.com,顺......
  • 【建议收藏】Log4j配置详解
    大家在日常开发中必然会使用到日志组件,Log4j是Java方向上比较常用的日志组件,今天给大家分享下Log4j支持的配置项,强烈建议收藏,以便配置时查看#展示log4j各种配置,私有部分见文件中注释,公有部分详细注释见文件最后log4j.rootLogger=DEBUG,console,file,rolling,daily,DATABASE......
  • Linux日志切割神器logrotate原理介绍和配置详解
    1、原理介绍create这也就是默认的方案,可以通过create命令配置文件的权限和属组设置;这个方案的思路是重命名原日志文件,创建新的日志文件。详细步骤如下:重命名正在输出日志文件,因为重命名只修改目录以及文件的名称,而进程操作文件使用的是inode,所以并不影响原程序继续输出日志......
  • (华为机试)扑克牌大小
    扑克牌游戏大家应该都比较熟悉了,一副牌由54张组成,含3~A、2各4张,小王1张,大王1张。牌面从小到大用如下字符和字符串表示(其中,小写joker表示小王,大写JOKER表示大王):345678910JQKA2jokerJOKER输入两手牌,两手牌之间用"-“连接,每手牌的每张牌以空格分隔,”-"两边没有空格,......
  • VMware Workstation 17 Pro安装配置CentOS 7与ssh工具链接配置
    下载安装虚拟机VMwareWorkstation17Pro虚拟机官网:点击直达下载Centos7镜像文件123网盘地址:点击直达提取码1213在虚拟机中安装Centos7第一步点击创建新的虚拟机第二步默认选择典型点击下一步第三步选择稍候安装操作系统点击下一步第四......
  • 2020-07-03 java配置环境变量
    java开发,首先要安装JDK,并配置环境1 安装JDK(本人下载的安装包,无脑下一步,选择了下文件夹),安装完成截图如下2 开始配置环境变量右键我的电脑==高级系统设置==环境变量==系统变量中选择新建 (1)JAVA_HOME路径根据自己安装的写,路径到(bin 上一层)例如:笔者的jdk 的bin......
  • frp内网穿透web服务配置
    frp是使用较多的免费开源的内网穿透软件,源代码托管在GitHub。1.下载安装安装步骤可参考官方文档https://gofrp.org/docs/setup/点击项目的release地址进入下载页面:https://github.com/fatedier/frp/releases,首先要根据自己需要安装的机器系统架构下载相应的二进制安装包。frp的......