2017年7月14日 星期五

Cisco Router 設定 SSH 連線

設定router只允許ssh連線,並使用本地端認証
Test-RTR#conf t
Test-RTR(config)#line vty 0 4
Test-RTR(config)#login local
Test-RTR(config)#transport input ssh
設定Domain Name
Test-RTR(config)#ip domain-name xxx
Cisco Router 產生一把rsa的key
Test-RTR(config)#crypto key generate rsa
The name for the keys will be: Test-RTR.xxx
Choose the size of the key modulus in the range of 360 to 4096 for your
  General Purpose Keys. Choosing a key modulus greater than 512 may take
  a few minutes.

How many bits in the modulus [512]: 4096
% Generating 4096 bit RSA keys, keys will be non-exportable...
設定SSH Version
Test-RTR(config)#ip ssh version 2
建立使用者及密碼,並做密碼加密
Test-RTR(config)#username admin password 1234567890
Test-RTR(config)#service password-encryption
設定登入特權模式密碼
Test-RTR(config)#enable secret 1234567890
這樣就可以測試登入了
Reference:

沒有留言:

張貼留言