• All
  • Test
  • Startup
  • Experience Case
  • FAQ
Product line
Search
Cancel
Documents type
Author
Time
Search

H3C switches cannot be logged in to Huawei switches over SSH

2022-03-03 15:23:32 Published
  • 0Followed
  • -1Collected ,488Browsed
MengPu 4level
fans:0 follow:0

Network Topology

Null

Problem Description

H3C switch cannot be used as a client to log in to huawei switch using SSH, and no error is reported:

< H3C> ssh2 10.*.*.11

Username: admin

Press CTRL+C to abort.

Connecting to 10.*.*.11 port 22.

   

< H3C>

Process Analysis

1. We test that other devices can use SSH to log in to Huawei switches. This indicates that the SSH service of huawei switches is normal

2. Huawei switches do not restrict the source IP addresses for SSH login

3. H3C switches and Huawei switches are deployed in the same Layer 2 environment and do not have security devices or packet filtering devices to intercept SSH packets

4. When logging in to H3C switch as a client, enable debug to check SSH negotiation process:

-----------------------------

<H3C>debugging ssh client all

<H3C>t  d

<H3C>t  m

<H3C>

<H3C>ssh2 10.*.*.11

Username: admin

Press CTRL+C to abort.

Connecting to 10.*.*.11 port 22.

*Jan 31 15:24:18:590 2022 H3C SSHC/7/EVENT: -COntext=1; Connection established.

*Jan 31 15:24:18:592 2022 H3C SSHC/7/EVENT: -COntext=1; Remote protocol version 2.0, remote software version HUAWEI-1.5

*Jan 31 15:24:18:592 2022 H3C SSHC/7/EVENT: -COntext=1; Enabling compatibility mode for protocol 2.0

*Jan 31 15:24:18:593 2022 H3C SSHC/7/EVENT: -COntext=1; Get self version string Comware-7.1.064

*Jan 31 15:24:18:593 2022 H3C SSHC/7/EVENT: -COntext=1; Local version string SSH-2.0-Comware-7.1.064

<H3C>*Jan 31 15:24:18:593 2022 H3C SSHC/7/MESSAGE: -COntext=1; Prepare packet[20].

*Jan 31 15:24:18:600 2022 H3C SSHC/7/MESSAGE: -COntext=1; Received packet type 20.

*Jan 31 15:24:18:600 2022 H3C SSHC/7/EVENT: -COntext=1; Received SSH2_MSG_KEXINIT.

*Jan 31 15:24:18:600 2022 H3C SSHC/7/EVENT: -COntext=1; My proposal kex:// The algorithmic capability set we support

*Jan 31 15:24:18:600 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(0): diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

*Jan 31 15:24:18:600 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(1): ecdsa-sha2-nistp256,ssh-dss,ssh-rsa

*Jan 31 15:24:18:600 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(2): aes128-cbc,aes256-cbc,3des-cbc,des-cbc

*Jan 31 15:24:18:600 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(3): aes128-cbc,aes256-cbc,3des-cbc,des-cbc

*Jan 31 15:24:18:600 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(4): hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96

*Jan 31 15:24:18:600 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(5): hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96

*Jan 31 15:24:18:600 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(6): none,zlib,zlib@openssh.com

*Jan 31 15:24:18:601 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(7): none,zlib,zlib@openssh.com

*Jan 31 15:24:18:601 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(8):

*Jan 31 15:24:18:601 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(9):

*Jan 31 15:24:18:601 2022 H3C SSHC/7/EVENT: -COntext=1; Peer proposal kex:  // Algorithm capability set supported by Huawei devices

*Jan 31 15:24:18:601 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(0): diffie-hellman-group14-sha1

*Jan 31 15:24:18:601 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(1): ecdsa-sha2-nistp256,ssh-rsa

*Jan 31 15:24:18:601 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(2): aes256-ctr,aes128-ctr,aes256-cbc,aes128-cbc,3des-cbc

*Jan 31 15:24:18:601 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(3): aes256-ctr,aes128-ctr,aes256-cbc,aes128-cbc,3des-cbc

*Jan 31 15:24:18:601 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(4): hmac-sha2-256

*Jan 31 15:24:18:601 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(5): hmac-sha2-256

*Jan 31 15:24:18:601 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(6): none

*Jan 31 15:24:18:601 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(7): none

*Jan 31 15:24:18:601 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(8):

*Jan 31 15:24:18:601 2022 H3C SSHC/7/EVENT: -COntext=1; Kex strings(9):

%Jan 31 15:24:18:601 2022 H3C SSHS/6/SSHS_ALGORITHM_MISMATCH: -COntext=1; SSH client 10.*.*.11 failed to log in because of Message Authentication code (MAC) algorithm mismatch.

*Jan 31 15:24:18:601 2022 H3C SSHC/7/ERROR: -COntext=1; No matching mac found: client hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96 server hmac-sha2-256

----------The login fails because the algorithms on the client and server do not match

<H3C>

<H3C>u t m

<H3C>u t d

<H3C>undo debugging all

Solution

1. Due to the old VERSION of H3C switch, the client cannot be adjusted to support more algorithms through commands

2. The version of huawei switch on the server has been updated. You can adjust the existing algorithm of the compatible H3C switch by running commands

3. Add the following configuration for Huawei switches:

<HW>sys

[HW]ssh server secure-algorithms cipher 3des aes128 aes256_cbc aes128_ctr aes256_ctr

[HW]ssh server secure-algorithms hmac md5 md5_96 sha1 sha2_256 sha1_96 sha2_256_96

 

The test can be logged in normally:  

<H3C>ssh2 10.*.*.11

Username: admin

Press CTRL+C to abort.

Connecting to 10.*.*.11 port 22.

The server is not authenticated. Continue? [Y/N]:y

Do you want to save the server public key? [Y/N]:n

admin@10.*.*.11's password:

Enter a character ~ and a dot to abort.

Warning: The password will expire in 17 days.

The password needs to be changed. Change now? [Y/N]: n

  -----------------------------------------------------------------------------    

  User last login information:    

  -----------------------------------------------------------------------------

  Access Type: SSH     

  IP-Address : 10.*.*.1    

  Time       : 2022-01-31 15:20:28+08:00    

  -----------------------------------------------------------------------------

<HW>

Please rate this case:   
0 comments

No comments

Add Comments:

举报

×

侵犯我的权益 >
对根叔知了社区有害的内容 >
辱骂、歧视、挑衅等(不友善)

侵犯我的权益

×

泄露了我的隐私 >
侵犯了我企业的权益 >
抄袭了我的内容 >
诽谤我 >
辱骂、歧视、挑衅等(不友善)
骚扰我

泄露了我的隐私

×

您好,当您发现根叔知了上有泄漏您隐私的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您认为哪些内容泄露了您的隐私?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)

侵犯了我企业的权益

×

您好,当您发现根叔知了上有关于您企业的造谣与诽谤、商业侵权等内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到 zhiliao@h3c.com 邮箱,我们会在审核后尽快给您答复。
  • 1. 您举报的内容是什么?(请在邮件中列出您举报的内容和链接地址)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
  • 3. 是哪家企业?(营业执照,单位登记证明等证件)
  • 4. 您与该企业的关系是?(您是企业法人或被授权人,需提供企业委托授权书)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

抄袭了我的内容

×

原文链接或出处

诽谤我

×

您好,当您发现根叔知了上有诽谤您的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您举报的内容以及侵犯了您什么权益?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔知了社区有害的内容

×

垃圾广告信息
色情、暴力、血腥等违反法律法规的内容
政治敏感
不规范转载 >
辱骂、歧视、挑衅等(不友善)
骚扰我
诱导投票

不规范转载

×

举报说明

提出建议

    +

Login before you can operate!

login

你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作