1)telnet 部分配置4行
telnet server enable
telnet server-source all-interface
local-user admin service-type telnet ssh
stelnet server enable
2)ssh
local-user admin service-type telnet ssh
ssh server-source all-interface
ssh server cipher aes256_ctr aes128_ctr
ssh server hmac sha2_256
ssh server key-exchange dh_group16_sha512 dh_group15_sha512 dh_group14_sha256 dh_group_exchange_sha256
ssh client cipher aes256_ctr aes128_ctr
ssh client hmac sha2_256
ssh client key-exchange dh_group16_sha512 dh_group15_sha512 dh_group14_sha256 dh_group_exchange_sha256
ssh server dh-exchange min-len 2048
ssh authorization-type default aaa
ssh server publickey rsa_sha2_512 rsa_sha2_256
以上是ssh部分的配置,我在3台交换机上配置了不同的ssh,最后确认,按照上述配置,我每次都ssh成功登录交换机了,使用paramiko/netmiko都可以成功登录。配置其他的一些参数,有一半机会成功,往往显示连接失败或者提示密码错误。