ssh設置

1、先設置主機名

Router(config)#hostname

Router(config)#hostname R1

R1(config)#

2、設置域名

R1(config)#ip domain-name cisco.com

3、將用戶設置爲支持ssh客戶端接入

R1(config)#username cisco password cisco

4、生成用於保護會話的密鑰

R1(config)#cry?

crypto

R1(config)#crypto ?

key          Long term key operations

R1(config)#crypto key ?

generate  Generate new keys

zeroize   Remove keys

R1(config)#crypto key g

R1(config)#crypto key generate ?

rsa  Generate RSA keys

R1(config)#crypto key generate rsa ?

<cr>

R1(config)#crypto key generate rsa

% You already have RSA keys defined named xxxx.cisco.com .

% Do you really want to replace them? [yes/no]: yes

The name for the keys will be: R1.cisco

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,6,7步,PT上都不支持

5、啓用ssh的第二版本

R1(config)#ssh version2

6、進入vty線路模式

R1(config)#line vty 0 15

7、講ssh和telnet作爲接入協議

R1(config)#transport input ssh telnet

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章