修改 ssh 端口

noteId: WEB082f74c897654fb48e66a0bd4f965c0e · 原始路径:/ALL/网络 - C模块/vty(SSH、Telnet)远程登陆/SSH/修改 ssh 端口.note

1、修改 ssh 端口号为 2222:

ip ssh port 2222 rotary 1line vty 0 15rotary 1exit# 此时,ssh原本的 22 号端口会和 2222 端口一起启用,如果想要禁用原本的 22 端口,则可以使用 acl 进行拒绝

2、限制 22 端口访问(只允许 2222 端口):

access-list 100 permit tcp any any eq 2222 //使用扩展 ACL# 默认会有一台 deny any anyline vty 0 15access-class 100 in //应用 ACL