Cisco-路由器配置SSH

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Cisco-路由器配置SSH相关的知识,希望对你有一定的参考价值。

Cisco-路由器配置SSH

拓扑图:(设备路由器的1941+HWIC-2T模块)

IP地址:

Router0:192.168.2.1/24

Router1:192.168.2.2/24

配置步骤:

配置前检查是否可以配置ssh(如下图就可以往下操作)

1、配置路由器IP地址:

Router0:

int serial 0/1/0

ip address 192.168.2.1 255.255.255.0

Router1:

int serial 0/1/0

ip address 192.168.2.2 255.255.255.0

2、修改设备名称(就配置SSH的那台机修改,如果不修改配置密钥时会报错)

Router0

hostname R1

3、配置域名

ip domain-name chen.com

4、配置RSA密钥

crypto key generate rsa

The name for the keys will be: R1.chen.com Choose the size of the key modulus in the range of 360 to 2048 for your General Purpose Keys. Choosing a key modulus greater than 512 may take a few minutes.

How many bits in the modulus [512]: 1024 % Generating 1024 bit RSA keys, keys will be non-exportable...[OK]

5、创建本地用户

username chen password chen

6、配置vty

R1(config)#line vty 0 4

R1(config-line)#transport input ssh

R1(config-line)#login local

7、使用Router1登入(账号是之前配置的账号和密码)

以上是关于Cisco-路由器配置SSH的主要内容,如果未能解决你的问题,请参考以下文章

cisco基本配置命令

cisco如何配置DHCP

用python管理Cisco路由器

cisco ACS 配置

Cisco VSS

phpseclib ssh2 pty telnet cisco - 如何推进 - 更多 - “show version”