SSHの設定例

構成トポロジケース
ここに画像を挿入説明
ケースは、請求項に配置された
遠隔デバイスIDをY、X配向デバイスID XXXXにループバックIP 0、インターネットIP XY.XY.XY.X / 24、1、
2、OSPFのための3台のルータを使用してIGP通信;
3、SSH R3上のポート設定512bitキー2009を使用して、
4、R3に作成したユーザー:R1、パスワード:シスコ;
。5、SSH R3のドメイン名は、www.cisco.comである;
場合は、配置されました思考
IP R1、R2とR3の上に配置された1:

R1(config)#interface fastEthernet 0/0       
R1(config-if)#ip address 12.1.1.1 255.255.255.0
R1(config-if)#no shutdown                      
R1(config-if)#interface loopback 0             
R1(config-if)#ip address 1.1.1.1 255.255.255.0 
R2(config)#interface fastEthernet 0/0       
R2(config-if)#ip address 12.1.1.2 255.255.255.0
R2(config)#interface fastEthernet 0/1       
R2(config-if)#ip address 23.1.1.2 255.255.255.0
R2(config-if)#no shutdown                      
R2(config-if)#interface loopback 0             
R2(config-if)#ip address 2.2.2.2 255.255.255.0 
R3(config)#interface fastEthernet 0/1       
R3(config-if)#ip address 23.1.1.3 255.255.255.0
R3(config-if)#no shutdown                      
R3(config-if)#interface loopback 0             
R3(config-if)#ip address 3.3.3.3 255.255.255.0 

図2に示すように、IGPマルチキャストへの接続を提供する3つのOSPFルータ上に配置されました。

R1(config)#router ospf 100                  
R1(config-router)#router-id 91.1.1.1               
R1(config-router)#network 1.1.1.0 0.0.0.255 area 0
R1(config-router)#network 12.1.1.0 0.0.0.255 area 0
R2(config)#router ospf 100                  
R2(config-router)#router-id 92.2.2.2               
R2(config-router)#network 2.2.2.0 0.0.0.255 area 0
R2(config-router)#network 12.1.1.0 0.0.0.255 area 0
R2(config-router)#network 23.1.1.0 0.0.0.255 area 0
R3(config)#router ospf 100                  
R3(config-router)#router-id 93.3.3.3               
R3(config-router)#network 3.3.3.0 0.0.0.255 area 0
R3(config-router)#network 23.1.1.0 0.0.0.255 area 0

3、ドメイン内R3:

R3(config)#ip domain-name www.cisco.com

図4に示すように、ローカルユーザーグループとVTY R3に関する:

R3(config)#username R1 password cisco
R3(config)#line vty 0 4
R3(config-line)#login local

5、R3上のSSH鍵を生成します。

R3(config)#crypto key generate rsa 
The name for the keys will be: R3.www.cisco.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]

図6は、SSH R3に配置されました。

R3(config)#ip ssh port 2009 rotary 1
R3(config)#line vty 0 4
R3(config-line)#rotary 1
R3(config-line)#transport inp
R3(config-line)#transport input ssh

ケースのテスト結果
1、コンフィギュレーションは、SSHログインすることがR3にR1で、完了です。

R1#ssh -l R1 -p 2009 3.3.3.3

Password: 

R3>

2、にTelnetのR3にR1で構成:

R1#telnet 3.3.3.3
Trying 3.3.3.3 ... 
% Connection refused by remote host

概要および他の
1は、それがTelnetのデータとキーとの遠位端に送信されないように、SSHは、安全なリモート制御プロトコルであるが、データは、ローカル鍵で暗号化された緻密なの先端後復号鍵、およびデータ伝送のセキュリティ強化;
2、ローカルドメイン名を設定するためのconfigure SSHへの前提条件の1;
3を、最初のSSH設定する前に、暗号キーを設定します。
デフォルトでは、4を、暗号鍵は512bitであり、手動でセキュリティを強化するように設定することができます;
5、完成構成のSSH、VTYの他の着陸アプローチの提案閉鎖後、セキュリティを強化します。

公開された231元の記事 ウォンの賞賛222 ・は 20000 +を見て

おすすめ

転載: blog.csdn.net/qinshangwy/article/details/104834543