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

Preview:

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.