3
Cấu hình router để hỗ trợ SSH Phiên bản IOS hỗ trợ cho SSH và được dùng trong bài lab này là Advance Security. Đầu tiên hãy dùng lệnh show version để kiểm tra IOS của bạn có hỗ trợ SSH không. demi#sh ver Cisco IOS Software, 2801 Software (C2801-ADVENTERPRISEK9-M), Version 12.3(14)T4, RELEASE SOFTWARE (fc2) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2005 by Cisco Systems, Inc. Compiled Thu 08-Sep-05 17:00 by kehsiao ROM: System Bootstrap, Version 12.3(8r)T9, RELEASE SOFTWARE (fc1) demi uptime is 2 hours, 37 minutes System returned to ROM by power-on System image file is "flash:c2801-adventerprisek9-mz.123-14.T4.bin" Sau đó cấu hình router demi hoạt động như ssh server. Vào chế độ config mode. demi#conf t Enter configuration commands, one per line. End with CNTL/Z. demi(config)#ip domain-name vnpro.org demi(config)#crypto key generate ? rsa Generate RSA keys <cr> demi(config)#crypto key generate rsa ? general-keys Generate a general purpose RSA key pair for signing and encryption usage-keys Generate separate RSA key pairs for signing and encryption <cr> demi(config)#crypto key generate rsa gnereneral demi(config)#crypto key generate rsa general-keys ? exportable Allow the key to be exported label Provide a label modulus Provide number of modulus bits on the command line <cr>

Cấu Hình Router Để Hỗ Trợ SSH

  • Upload
    kha-ng

  • View
    216

  • Download
    2

Embed Size (px)

Citation preview

Cu hnh router h tr SSH

Phin bn IOS h tr cho SSH v c dng trong bi lab ny l Advance Security. u tin hy dng lnh show version kim tra IOS ca bn c h tr SSH khng.

demi#sh verCisco IOS Software, 2801 Software (C2801-ADVENTERPRISEK9-M), Version 12.3(14)T4, RELEASE SOFTWARE (fc2)Technical Support:http://www.cisco.com/techsupportCopyright (c) 1986-2005 by Cisco Systems, Inc.Compiled Thu 08-Sep-05 17:00 by kehsiao

ROM: System Bootstrap, Version 12.3(8r)T9, RELEASE SOFTWARE (fc1)

demi uptime is 2 hours, 37 minutesSystem returned to ROM by power-onSystem image file is "flash:c2801-adventerprisek9-mz.123-14.T4.bin"

Sau cu hnh router demi hot ng nh ssh server. Vo ch config mode.

demi#conf tEnter configuration commands, one per line. End with CNTL/Z.

demi(config)#ip domain-name vnpro.orgdemi(config)#crypto key generate ?rsa Generate RSA keys

demi(config)#crypto key generate rsa ?general-keys Generate a general purpose RSA key pair for signing andencryptionusage-keys Generate separate RSA key pairs for signing and encryption

demi(config)#crypto key generate rsa gnereneraldemi(config)#crypto key generate rsa general-keys ?exportable Allow the key to be exportedlabel Provide a labelmodulus Provide number of modulus bits on the command line

demi(config)#crypto key generate rsa general-keys modulus 1024The name for the keys will be: demi.vnpro.org

% The key modulus size is 1024 bits% Generating 1024 bit RSA keys ...[OK]

demi(config)#*Dec 10 0324.763: %SSH-5-ENABLED: SSH 1.99 has been enabled

Cu hnh cho php cc line vty chy ssh

demi#conf tEnter configuration commands, one per line. End with CNTL/Z.demi(config)#line vty 0 4demi(config-line)#login localdemi(config-line)#transport input ssh

Khai bo username v password cc b

demi#conf tEnter configuration commands, one per line. End with CNTL/Z.demi(config)#username cisco password cisco

Ci t chng trnh Putty lm ssh client

Sau chy chng trnh Putty

Nhp vo username v password khai bo trn router

Sau bn c th vo enable mode cu hnh router bnh thng

Trn router lc ny dng lnh show ssh

demi#show sshConnection Version Mode Encryption Hmac State Username0 2.0 IN aes256-cbc hmac-sha1 Session started vnpro0 2.0 OUT aes256-cbc hmac-sha1 Session started vnpro%No SSHv1 server connections running.