Cisco‎ > ‎

Cisco設定遠端連線(Telnet & SSH)

Telnet Remote Connection

1.     開啟終端機程式putty,使用Console登入Cisco Switch 

2.     設定Switch IP位址 (設定vlan 1)

JLAB(config)# interface vlan 1    //進入vlan 1介面

JLAB(config-if)# ip address 192.168.1.253 255.255.255.0    //設定IP及遮罩位址

JLAB(config-if)# no shutdown    //啟動vlan 1介面

JLAB(config-if)# exit

 

3.     檢視vlan 1介面設定

JLAB# sh ip int vlan1

Vlan1 is up, line protocol is up

  Internet address is 192.168.1.253/24

 

JLAB# sh ip int br

Interface            IP-Address      OK?    Method Status     Protocol

FastEthernet0/1       unassigned      YES     manual up          up

Vlan1              192.168.1.253    YES     manual up          up

 

4.     設定Telnet連線密碼

JLAB(config)# line vty 0 4    //設定Telnet連線數量 0~4,共5組。

JLAB(config-line)# password 123456    //設定密碼

JLAB(config-line)# login    //套用

JLAB(config-line)# exit

JLAB(config)# service password-encryption    //將明碼的password加密

JLAB# write memory   //將以上配置檔寫回NVRAM

Building configuration...

[OK]

 

5.     開啟Telnet進行連線

 

SSH Remote Connection

1.     設定SSH連線

switch(config)# hostname JLAB    //命名主機名稱

JLAB(config)# ip domain-name james-tw.com    //設定網域名稱

JLAB(config)# crypto key generate rsa    //產生金鑰

The name for the keys will be: JLAB.james-tw.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]:

% Generating 512 bit RSA keys, keys will be non-exportable...[OK]

 

JLAB(config)# username james privilege 15 password 123456    //設定帳號、密碼,權限最高設為等級15

JLAB(config)# line vty 0 15

JLAB(config-line)# login local   //使用帳號、密碼作驗證。



Comments