1、拓扑图

最终实现通过AR1 来SSH登陆到AR2 上

2、配置AR2为开启SSH服务

Please press enter to start cmd line!
##############
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int
[Huawei]interface g
[Huawei]interface GigabitEthernet //
[Huawei-GigabitEthernet0//]ip addr
[Huawei-GigabitEthernet0//]ip address 12.1.1.2
[Huawei-GigabitEthernet0//]
Dec ::-: Huawei %%01IFNET//LINK_STATE(l)[]:The line protocol
IP on the interface GigabitEthernet0// has entered the UP state.
[Huawei-GigabitEthernet0//]q
[Huawei]stel
[Huawei]stelnet ser
[Huawei]stelnet server en
[Huawei]stelnet server enable
Info: Succeeded in starting the STELNET server.
[Huawei]rsa ?
local-key-pair Local RSA public key pair operations
peer-public-key Remote peer RSA public key configuration.
[Huawei]rsa loc
[Huawei]rsa local-key-pair ?
create Create new local public key pairs
destroy Destroy the local public key pairs
[Huawei]rsa local-key-pair cre
[Huawei]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 ( ~ ).
NOTES: If the key modulus is greater than ,
It will take a few minutes.
Input the bits in the modulus[default = ]:
Generating keys...
........................++++++
.........++++++
............++++++++
...............++++++++ [Huawei]aaa
[Huawei-aaa]loc
[Huawei-aaa]local-user user-ssh pass
[Huawei-aaa]local-user user-ssh password ci
[Huawei-aaa]local-user user-ssh password cipher huawei
Info: Add a new user.
[Huawei-aaa]loc
[Huawei-aaa]local-user user-ssh pri
[Huawei-aaa]local-user user-ssh privilege level
[Huawei-aaa]local-user user-ssh privilege level
[Huawei-aaa]loc
[Huawei-aaa]local-user user
[Huawei-aaa]local-user user-ssh serv
[Huawei-aaa]local-user user-ssh service-type ssh
[Huawei-aaa]q
[Huawei]user-in
[Huawei]user-interface vty
[Huawei]user-interface vty
[Huawei]user-interface vty
[Huawei]user-interface vty
[Huawei-ui-vty0-]aut
[Huawei-ui-vty0-]authentication-mode aaa
[Huawei-ui-vty0-]pro
[Huawei-ui-vty0-]protocol ?
inbound Incoming protocol
[Huawei-ui-vty0-]protocol in
[Huawei-ui-vty0-]protocol inbound ssh
[Huawei-ui-vty0-]q
[Huawei]ssh user
[Huawei]ssh user user
[Huawei]ssh user user-
[Huawei]ssh user user-ssh au
[Huawei]ssh user user-ssh authentication-type ?
all All authentication, password or RSA
password Password authentication
password-rsa Both password and RSA
rsa RSA authentication
[Huawei]ssh user user-ssh authentication-type all
Authentication type setted, and will be in effect next time
[Huawei]sysnan    
[Huawei]sysna    
[Huawei]sysname AR@
[AR@]sysname AR@
[AR@]sysname AR2
[AR2]

3、AR1作为SSH客户端接连AR2测试

Please press enter to start cmd line!
##########################
<Huawei>
Dec ::-: Huawei %%01IFPDT//IF_STATE(l)[]:Interface GigabitEt
hernet0// has turned into UP state.
<Huawei> Please check whether system data has been changed, and save data in time Configuration console time out, please press any key to log on <Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR1
[AR1]int
[AR1]interface g
[AR1]interface GigabitEthernet //
[AR1-GigabitEthernet0//]ip address 12.1.1.1
[AR1-GigabitEthernet0//]
Dec ::-: AR1 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state.
[AR1-GigabitEthernet0//]q
[AR1]ping 12.1.1.2
PING 12.1.1.2: data bytes, press CTRL_C to break
Reply from 12.1.1.2: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.2: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.2: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.2: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.2: bytes= Sequence= ttl= time= ms --- 12.1.1.2 ping statistics ---
packet(s) transmitted
packet(s) received
0.00% packet loss
round-trip min/avg/max = // ms [AR1]ssh 12.1.1.2
^
Error: Unrecognized command found at '^' position.
[AR1]ssh
[AR1]ssh ?
client Set SSH client attribute
server Specify the server attribute
user SSH user
[AR1]ssh ssh
[AR1]ssh clei
[AR1]ssh clien
[AR1]ssh client ?
STRING<-> Specify SSH server IP address or name
first-time Set SSH client attribute of authenticating user for the first
time access.
[AR1]ssh client fri
[AR1]ssh client fir
[AR1]ssh client first-time
^
Error:Incomplete command found at '^' position.
[AR1]ssh client first-time
^
Error:Incomplete command found at '^' position.
[AR1]ssh client first-time ?
enable Enable authentication for first time access.
[AR1]ssh client first-time en
[AR1]ssh client first-time enable
[AR1]ssh
[AR1]ssh ?
client Set SSH client attribute
server Specify the server attribute
user SSH user
[AR1]ste
[AR1]stelnet ?
STRING<-> IP address or host name of a remote system
-a Set the source IP address of SSH packets
server Set Stelnet server
[AR1]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 ...
The server is not authenticated. Continue to access it? (y/n)[n]:y
Dec ::-: AR1 %%01SSH//CONTINUE_KEYEXCHANGE(l)[]:The server h
ad not been authenticated in the process of exchanging keys. When deciding wheth
er to continue, the user chose Y.
[AR1]
Save the server's public key? (y/n)[n]:y
The server's public key will be saved with the name 12.1.1.2. Please wait... Dec ::-: AR1 %%01SSH//SAVE_PUBLICKEY(l)[]:When deciding whet
her to save the server's public key 12.1.1.2, the user chose Y.
[AR1]
Enter password:
<AR2>dis ip in
<AR2>dis ip interface bri
<AR2>dis ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is
The number of interface that is DOWN in Physical is
The number of interface that is UP in Protocol is
The number of interface that is DOWN in Protocol is Interface IP Address/Mask Physical Protocol
GigabitEthernet0// 12.1.1.2/ up up
GigabitEthernet0// unassigned down down
GigabitEthernet0// unassigned down down
NULL0 unassigned up up(s)
<AR2>

HCNA配置ssh远程登陆的更多相关文章

  1. ubuntu19配置静态IP并开启SSH远程登陆

    前言  从ubuntu从17.10开始,已经不再在/etc/network/interfaces里配置IP,即使配置了也不会生效,而是改成netplan方式 ,配置写在/etc/netplan/文件夹 ...

  2. CentOS6无法本地登陆,ssh远程登陆没问题

    CentOS6无法本地登陆,ssh远程登陆没问题---使用CentOS自带的rsyslog分析调试 Apr 21 14:15:27 raccontroller init: tty (/dev/tty1 ...

  3. 树莓派3b+ Ubuntu 16.04 MATA系统 ssh远程登陆后修改主机名、用户密码和用户名

    写在前面: 刚刚开始写博客,记录下自己的学习过程,备忘. 最近在使用树莓派做智能小车的开发,使用的是树莓派3b+,安装的是Ubuntu 16.04 MATA 系统,安装系统后需要修改主机名,登陆密码以 ...

  4. SSH 远程登陆

    2019-03-10 20:41:39 一.什么是SSH 简单说,SSH是一种网络协议,用于计算机之间的加密登录. 如果一个用户从本地计算机,使用SSH协议登录另一台远程计算机,我们就可以认为,这种登 ...

  5. Linux服务器开启ssh服务,实现ssh远程登陆!

    最近在学linux,使用ssh远程登陆linux,记录下来! 首先进入/etc目录下,/etc目录存放的是一些配置文件,比如passwd等配置文件,要想使用ssh远程登陆,需要配置/etc/ssh/s ...

  6. Linux2 在Linux(CentOS)上配置SSH免登陆

    前言:      本文主要是我在安装hadoop之前,需要先配置SSH免登陆.通过网上搜索,发现不少类似的资料,但多少都有些小问题,所以结合自己的实践,记录在此,作为参考.如果能帮助到其他人,自然是更 ...

  7. linux系统新建用户ssh远程登陆显示-bash-4.1$解决方法

    linux系统新建的用户用ssh远程登陆显示-bash-4.1$,不显示用户名路径 网络上好多解决办法,大多是新建.bash_profile文件然后输入XXXXX....然而并没有什么用没有用.... ...

  8. linux系统新建用户ssh远程登陆显示-bash-4.1$解决方法,ssh-bash-4.1

    linux系统新建的用户用ssh远程登陆显示-bash-4.1$,不显示用户名路径 网络上好多解决办法,大多是新建.bash_profile文件然后输入XXXXX....然而并没有什么用没有用.... ...

  9. CentOS配置SSH远程连接

    本文为大家介绍Centos中配置SSH远程连接的方法,只是简单配置,供初学者参考. 1.配置IP#setup 选择 NetWork configuration 选择 Device configurat ...

随机推荐

  1. 项目笔记《DeepLung:Deep 3D Dual Path Nets for Automated Pulmonary Nodule Detection and Classification》(二)(上)模型设计

    我只讲讲检测部分的模型,后面两样性分类的试验我没有做,这篇论文采用了很多肺结节检测论文都采用的u-net结构,准确地说是具有DPN结构的3D版本的u-net,直接上图. DPN是颜水成老师团队的成果, ...

  2. hdu2068 RPG的错排

    RPG的错排 时间限制:1000/1000 MS(Java / Others)内存限制:32768/32768 K(Java / Others)总提交内容:16421接受的提交内容:6670 问题描述 ...

  3. ubuntu中误删/var/lib/dpkg/info的补救方法

    今晚在ubuntu上安装一个软件时,出现这样的错误提示:E: Sub-process /usr/bin/dpkg returned an error code (1)然后在网上找了查找问题原因及解决方 ...

  4. Python 基础学习之if语句

    cars=['audi','xiali','bwm','benz',] ##根据要求bmw全部为大写,其他的首字母为大写 for car in cars: if car=='bmw': print(c ...

  5. SQL常用性能统计语句

    1.查看SQL语句IO消耗 set statistics io on     sql 语句 set statistics io off 2.查看SQL语句时间消耗 set statistics tim ...

  6. (转)Mat, vector<point2f>,Iplimage等等常见类型转换

    在mfc c++ 以及opencv 编写程序当中,很多常用的类型转换,现在总结一下.(注意加相应的头文件,这里不罗嗦) 提纲: 1. Mat ---> Iplimage 2. Iplimage  ...

  7. CPU的CAS操作

    https://blog.csdn.net/qq_35492857/article/details/78471032 https://www.cnblogs.com/gdjdsjh/p/5076815 ...

  8. java——时间复杂度、动态数组

    O(n)不一定小于O(n^2),要具体来看,而我们说的这种时间复杂度其实是渐进时间复杂度,描述的是n趋近于无穷的情况. 动态数组的时间复杂度: 添加操作:O(n) addLast()的均摊复杂度为O( ...

  9. Python Numpy Array

    Numpy 是Python中数据科学中的核心组件,它给我们提供了多维度高性能数组对象. Arrays Numpy.array   dtype 变量 dtype变量,用来存放数据类型, 创建数组时可以同 ...

  10. Cmder光标错位的问题&VSCode终端光标错位问题

    问题 本机中安装了 Cmder,几乎是0配置 ,同时在 VSCode 中设置默认终端为 Cmder,在 VSCode 中打开终端,显示如图: 这里光标实际的位置是 . 的后面,但是表现出来的是多一个空 ...