• 网络day02-设备配置远程登录


    1、Console登录

    使用console线连接PC和交换机或路由器,通过超级终端配置端口COM1和连接参数(每秒位数9600,数据位为8,奇偶校验为无,停止位为1,数据流控制为None)。

    switch(config)#line console 0     #进入控制台口
    switch(config-line)#line vty 0 4  #进入虚拟终端
    switch(config-line)#password cisco #设置虚拟终端登录口令cisco
    switch(config-line)#login          #允许登录
    switch#exit                        #返回命令         

    2、预配置

    no ip domain-lookup //关闭主机查询
    line vty 0 4
    loggin synchronous //开启虚拟接口下的日志同步,避免输入命令被打断
    exec-timeout 0 0 //超时时间为0分0秒,即永不超时
    no exec-timeout //永不超时,效果同上
    no ip http server //关闭http服务
    no ip http secure-server //关闭https服务

    3、Telnet登录

    Telnet服务默认启用,空密码不支持远程登录。登录方式有两种:1、基于密码登录 2、基于本地数据库登录
    (1)、基于密码登录,配置Telnet远程登录密码

    line vty 0 4
    password cisco

    (2)、基于本地数据库登录,配置本地账号密码

    username admin password cisco
    line vty 0 4
    login local

    必须配置特权密码

    enable password cisco
    enable secret cisco

    4、SSH服务

    SSH服务配置步骤:

    Router#conf t
    Router(config)#ip domain-name cisco.com    //1、启用域名
    Router(config)#crypto key generate rsa     //2、创建RSA密码,设置加密长度    
    Router(config)#ip ssh version 2            //3、部署SSH版本
    Router(config)#username admin secret cisco //4、配置本地登录账户
    Router(config)#line vty 0 4                //5、应用到VTY接口
    Router(config-line)#transport input ssh         //登录方式为ssh
    Router(config-line)#login local                 //认证方式为本地账号
    Router(config)#enable secret cisco         //6、配置特权密码

    5、Http

    思科默认开启Http服务

    Router#configure terminal
    Router(config)#access-list 10 permit 172.25.1.1
    Router(config)#access-list 10 deny any
    Router(config)#ip http server
    Router(config)#ip http access-class 10
    Router(config)#end
    注释 由于IOS 12.1(5)之前存在HTTP 访问的高危漏洞,所以如果你的IOS 版本小于此版本建议不要开启此服务
    Router(config)#no ip http server  关闭服务

    6、Https

    开启Https服务

    Router(config)#ip http secure-server
    Router(config)#ip https server
    注释 IOS 12.2(14)S 之后引入此特性,建议先用no ip http server 命令关闭非加密的HTTP访问,然后
    开启安全的访问,同时可以使用ip http secure-port 8080 命令来更改访问端口

    7、SDM

    SDM(Security Device Manager)是Cisco公司提供的全新图形化路由器管理工具,可安装在PC或路由器中,安装到路由器时基本安装需要大约4-5M Flash空间。
    路由器需开启Http或Https服务才可以(平时并不常用)。

    8、定时重启

    很有用的命令,当你在对路由器配置进行修改前可以先行输入此命令,然后进行修改但是不保存配置,这样可以防止把自己锁在路由器之外。

    可以使用reload cancel 命令来取消定时重启

    Router1#reload in 20
    Reload scheduled for 11:33:53 EST Sat Feb 1 2003 (in 20 minutes)
    Proceed with reload? [confirm] <enter>
    Router1#
    Router1#reload at 14:00 Feb 2
    Reload scheduled for 14:00:00 EST Sun Feb 2 2003 (in 26 hours and 44 minutes)
    Proceed with reload? [confirm] <enter>
    Router1#

     9、密码配置

    enable密码配置

    enable password xxx //配置明文密码
    enable secret xxx //配置加密密码

    本地用户密码配置

    username admin password xxx //明文
    username admin secret xxx //密文
    service password-encrypition //使所有明文显示的密码加密
    security password min-length x //配置最小密码长度,范围为0-6,建议用10)
  • 相关阅读:
    vue keep-alive的使用
    vscode 快捷键整理
    form表单的验证validator如何传递参数
    使用elementui 的validateField,resetFields,clearValidate的使用
    vue sass样式穿透实现
    部署node服务(在本地模拟环境进行部署)
    利用存css实现弧形边界
    koa mongoose 实践篇,各种必要的功能总结;
    koa mogoose 创建后台服务连接数据库并进行增删改查
    vue项目中 render函数直接操作html元素报错
  • 原文地址:https://www.cnblogs.com/dxnui119/p/10834922.html
Copyright © 2020-2023  润新知