思科交换机配置ssh登陆

配置管理ip
config terminal
interface vlan 999
ip address 192.168.1.1 255.255.255.0
no shutdown
配置hostname和domain-name
hostname switch-ssh 修改设备名,配置ssh时不能为router
ip domain-name test.com 修改域名,配置ssh必须
aaa new-model 开启3a认证
生成RSA秘钥
crypto key generate rsa
how many bits in the modulus [512]:768/1024
crypto key zeroize rsa   #删除rsa秘钥 配置时可不进行此操作
创建用户名和密码
username admin privilege 15 secret 123456
配置enable密码
enable secret 123456
配置vty
line vty 0 4
transport input ssh
exec-timeout 10 0
logging synchronous
login local
ssh其他配置
ip ssh authentication-retries 2
ip ssh time-out 120
ip ssh version 2
ip ssh source-interface f0/0
write

posted @ 2026-02-13 15:38  MYQF晓星尘  阅读(3)  评论(0)    收藏  举报