2个方式 1是在这个接口下发acl控制列表。acl里定义禁止telnet协议也就是tcp的23端口。 2是定义acl 只允许某些ip或者网段,在user-interface vty视图下下发acl 这样就只能acl里的ip访问设备