• Lab SSH Cisco



    r1(config)#enable secret cisco
    r1(config)#username cisco secret cisco
    r1(config)#ip domain-name cisco.com       //定义域名,配置SSH必需
    r1(config)#crypto key generate rsa modulus 2048    //生成密钥

    r1(config)#access-list 90 permit 12.1.1.2
    r1(config)#line vty 0 4  
    r1(config-line)#login local 
    r1(config-line)#transport input ssh 
    r1(config-line)#access-class 90 in
    r1(config-line)#exit

    PC#ssh -l cisco  12.1.1.1

    Password: 

    r1>en
    Password: 
    r1#


    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++==


    route(config)#hostname cisco
    route(config)#enable secret cisco 
    cisco(config)#ip domain-name cisco.com
    cisco(config)#crypto key generate rsa (general-keys) modulus 2048
    //(access-list 90 permit 12.1.1.1)
    #cisco(config)#ip ssh time-out 60
    #cisco(config)#ip ssh authentication-retries 2
    cisco(config)#username cisco password cisco
    cisco(config)#line vty 0 4
    //(access-class 90 in )
    #cisco(config)#transport input none
    cisco(config)#transport input ssh telnet
    cisco(config)#login local

    //然后在PC试验
    PC#ssh -l cisco 12.1.1.1
    -l 后面是用户名


    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    cisco#sh run
    Building configuration...

    Current configuration : 1162 bytes
    !
    version 12.2
    service timestamps debug uptime
    service timestamps log uptime
    no service password-encryption
    !
    hostname cisco
    !
    boot-start-marker
    boot-end-marker
    !
    enable secret 5 $1$fMqP$doXFoR2eb1Hz6qDTpaTvk/
    !
    username cisco password 0 cisco
    ip subnet-zero
    ip cef
    !
    !
    ip domain-name cisco
    !
    ip ssh authentication-retries 5
    no mpls traffic-eng auto-bw timers frequency 0
    call rsvp-sync
    !
    !
    !
    !
    !
    !
    !
    !
    interface FastEthernet2/0
     ip address 192.168.20.1 255.255.255.0
     duplex full
     no clns route-cache
    !
    interface Serial4/0
     no ip address
     shutdown
     serial restart-delay 0
     no clns route-cache
    !
    interface Serial4/1
     no ip address
     shutdown
     serial restart-delay 0
     no clns route-cache
    !
    interface Serial4/2
     no ip address
     shutdown
     serial restart-delay 0
     no clns route-cache
    !
    interface Serial4/3
     no ip address
     shutdown
     serial restart-delay 0
     no clns route-cache
    !
    ip classless
    !
    no ip http server
    !
    !
    !
    !
    !
    !         
    control-plane
    !
    !
    dial-peer cor custom
    !
    !
    !
    banner motd ^C


    (^(oo)^)


    ^C
    !
    line con 0
     exec-timeout 0 0
     logging synchronous
     stopbits 1
    line aux 0
     stopbits 1
    line vty 0 4
     password cisco
     login local
     transport input telnet ssh
    !
    !
    end

  • 相关阅读:
    QWT编译与配置-Windows/Linux环境
    Manjaro Linux KDE个人的一些安装配置
    2019嵌入式之路的反思
    Linux内核调用I2C驱动_驱动嵌套驱动方法
    Ubuntu Linux TinySerial串口调试助手 可视化界面 安装使用
    ZYNQ的Linux Linaro系统镜像制作SD卡启动
    eclipse CDT Error: Program "g++" not found in PATH
    js Date格式化时间兼容写法
    ajax多图片上传demo
    php文件上传$_FILES数组格式
  • 原文地址:https://www.cnblogs.com/cyrusxx/p/12615677.html
Copyright © 2020-2023  润新知