ensp配置ssh后无法远程连接问题

报错:Info: The connection was closed by the remote host
在这里插入图片描述在使用router配置ssh登录后,我通过Router1 ssh 登录Router2,出现如上报错信息。
使用旁边的AR3260设备则可以ssh登录。
以下为AR1,AR2的配置。
AR2(被远程登录的对象):

[Huawei]sysname R2
[R2]user-interface vty 0 4
[R2-ui-vty0-4]authentication-mode aaa
[R2-ui-vty0-4]protocol inbound ssh 
[R2-ui-vty0-4]q
[R2]aaa
[R2-aaa]local-user user1 password cipher 123
[R2-aaa]local-user user1 privilege level 3
[R2-aaa]local-user user1 service-type ssh
[R2-aaa]q
[R2]ssh user user1 authentication-type password
[R2]stelnet server enable 
[R2]rsa local-key-pair create
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip address 1.1.1.1 24

AR1(作为要远程登录的路由器):

[Huawei]sysname R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip address 1.1.1.2 24
[R1-GigabitEthernet0/0/0]qu
[R1]ping 1.1.1.1
  PING 1.1.1.1: 56  data bytes, press CTRL_C to break
    Reply from 1.1.1.1: bytes=56 Sequence=1 ttl=255 time=150 ms
    Reply from 1.1.1.1: bytes=56 Sequence=2 ttl=255 time=30 ms
    Reply from 1.1.1.1: bytes=56 Sequence=3 ttl=255 time=20 ms
[R1]ssh client first-time enable 
[R1]stelnet 1.1.1.1
Please input the username:user1
Trying 1.1.1.1 ...
Press CTRL+K to abort
Connected to 1.1.1.1 ...
The server is not authenticated. Continue to access it? (y/n)[n]:y
Jul 25 2022 15:09:39-08:00 R1 %%01SSH/4/CONTINUE_KEYEXCHANGE(l)[2]:The server ha
d not been authenticated in the process of exchanging keys. When deciding whethe
r to continue, the user chose Y. 
[R1]
Save the server's public key? (y/n)[n]:y
The server's public key will be saved with the name 1.1.1.1. Please wait...

Jul 25 2022 15:09:40-08:00 R1 %%01SSH/4/SAVE_PUBLICKEY(l)[3]:When deciding wheth
er to save the server's public key 1.1.1.1, the user chose Y. 
[R1]
Enter password:
<R2>

  • 3
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值