大网数据广告活动
服务器运维问答

Cannot ssh into cisco switch: Invalid key length

· 52CE 我爱测

For some reason I cannot ssh into a Cisco Catalyst C3750 Switch. This is the error message, that I get: ssh_dispatch_run_fatal: Connection to 192.168.7.6 port 22: Invalid key length This is the SSH config, that I am using: Host 1…

问题原文

原帖链接 · Mebus · CC BY-SA 4.0

For some reason I cannot ssh into a Cisco Catalyst C3750 Switch. This is the error message, that I get:

   ssh_dispatch_run_fatal: Connection to 192.168.7.6 port 22: Invalid key length

This is the SSH config, that I am using:

   Host 192.168.7.6
   IdentitiesOnly yes
   KexAlgorithms=+diffie-hellman-group1-sha1

My SSH-Version is:

   OpenSSH_7.6p1, OpenSSL 1.1.0h-fips  27 Mar 2018

I already ran:

   crypto key generate rsa

on the switch and generated a 2048 length key, but this did not help. I also reloaded the switch.

Thanks

社区高分解答

原帖链接 · Kevin · CC BY-SA 4.0

openssh refuses the key length less than 1024 bits starting 7.6. https://www.openssh.com/txt/release-7.6

If you use ubuntu, you can install openssh-client-ssh1, then use ssh1 command instead of ssh.

sudo apt install openssh-client-ssh1

Sometimes you need to specify parameter -c to your ssh command with the cypher (e.g. -c 3des-cbc)

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-05-06)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。