cisco配置ssh,telnet
本文最后更新于 2024年6月12日 晚上
cisco 配置ssh,telnet
开启
telnet
1
2
3
4
5
6
7
Switch(config)#enable password cisco
Switch(config)#username myadmin privilege 15 password 2012Newbase
Switch(config)#line vty 0 4
Switch(config-line)#login local
Switch(config-line)# transport input telnet
Switch(config-line)#exit
Switch(config)#exit开启
ssh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# 设置enable
(config)#enable password cisco
# 设置域名
(config)# ip domain-name ctocio.com.cn
# 生成key
(config)#crypto key generate rsa general-keys modulus 1024
# 配置超时, ssh认证次数, 版本
(config)#ip ssh time 120 //设置ssh时间为120秒
(config)#ip ssh authentication 4 //设置ssh认证重复次数为4,可以在0-5之间选择
(config)#ip ssh version 2
# 查看配置
(config)#do show ip ssh
# 启用AAA
(config)#aaa new-model
(config)#aaa authentication login HQSM local //启用aaa认证,设置在本地服务器上进行认证
(config-line)#username ctocio password ctocio
(config)# service password-encryption //将上述所配置密码加密保存
# 在虚拟终端上应用
(config)#line vty 0 4
(config-line)#login authentication HQSM
(config-line)#transport input ssh
(config-line)#exit
# 查看用户
(config)#do show aaa local user lockout
(config)#do clear aaa local lockout username ctocio # 清除锁定的用户
# 保存配置
# wr可以选择acl
1
2
3
access-list 100 perimt ip host 172.31.100.1 any
line vty 0 4
access-class 100 in
cisco配置ssh,telnet
https://www.kwenyan.link/post/10005.html