View Full Version : Access vô Router qua SSH sử dụng RSA authentication
yakuzazu
19-10-2011, 03:22 PM
Chào Thầy Minh và các bạn
Mình đang cấu hình Router và Switch Cisco để khi access thông qua ssh và có chứng thực RSA, vậy các bước cần phải thực hiện như thế nào mong thầy và các bạn giúp đỡ.
p/s: Mình đã cấu hình để login vô router bằng ssh.
yakuzazu
21-10-2011, 09:32 AM
Hic..hok co ai giup minh nhi?
hvanhtuan
21-10-2011, 11:15 AM
Bạn tham khảo qua link này nhé.
http://blog.ioshints.info/2009/10/ssh-rsa-authentication-works-in-ios.html
thanh9876
21-10-2011, 03:05 PM
Chào bạn,
bạn có thể dùng các dòng lệnh này để cấu hình SSH, chạy tốt với switch 6513 & 4507. Tuy nhiên với dòng switch IOS cũ như 3750, 2960, 2950 thì mình thử không chạy được, do vậy khi triển khai SSH bạn nên check lại IOS xem có hỗ trợ không nhé:
ip domain-name tendomain.local
crypto key generate rsa general-keys modulus 1024
ip ssh time-out 60
ip ssh authentication-retries 2
ip ssh version 2
username name privilege 15 password abc
line vty 0 4
login local
transport input ssh
Chúc bạn làm tốt !
nthtrang
21-10-2011, 03:29 PM
Chào Thầy Minh và các bạn
Mình đang cấu hình Router và Switch Cisco để khi access thông qua ssh và có chứng thực RSA, vậy các bước cần phải thực hiện như thế nào mong thầy và các bạn giúp đỡ.
p/s: Mình đã cấu hình để login vô router bằng ssh.
Chào bạn,
Bạn thử tham khảo và thực hiện theo những bước sau há:
Setup an IOS Router as an SSH server that performs RSA based User AuthenticationComplete these steps in order to configure the SSH server to perform RSA based authentication.
Specify the Host name.
Router(config)#hostname <host name>
Define a default domain name.
Router(config)#ip domain-name <Domain Name>
Generate RSA key pairs.
Router(config)#crypto key generate rsa
Configure SSH-RSA keys for user and server authentication.
Router(config)#ip ssh pubkey-chain
Configure the SSH username.
Router(conf-ssh-pubkey)#username <user name>
Specify the RSA public key of the remote peer.
Router(conf-ssh-pubkey-user)#key-string
Specify the SSH key type and version. (optional)
Router(conf-ssh-pubkey-data)#key-hash ssh-rsa <key ID>
Exit the current mode and return to privileged EXEC mode.
Router(conf-ssh-pubkey-data)#endNote: Refer to Secure Shell Version 2 Support (http://www.cisco.com/en/US/docs/ios/sec_user_services/configuration/guide/sec_secure_shell_v2.html) for more information.
Nếu có thắc mắc thì tham khảo link này hén :http://www.cisco.com/en/US/tech/tk583/tk617/technologies_tech_note09186a00800949e2.shtml (khá đầy đủ đóa)
chúc bạn zui :)
yakuzazu
24-10-2011, 01:03 PM
Cảm ơn các reply của các pro, nhưng mình vẫn chưa làm được.
Mình hiểu thế này:
TRong Router hiện tại đang có 1 public key, mình sẽ sử dụng lệnh: crypto key generate rsa {general-keys | usage-keys} [label key-label] exportable để export ra được 3 file gồm: CA, Security centificate và PRV file. Sau đó mình sẽ sử dụng PuttyGen để tạo ra cặp key Public và Private, sau đó sẽ import vô lại router, nhưng không thành công. Khi export file sử dụng lệnh crypto ca export trustpointname pkcs12 destination url passphrase, nhưng hình như một số Router không xuất ra file pkcs12 được, mà chỉ xuất được file Pem, vậy mình hỏi: làm thế nào để xuất được publickey và private key, sau đó sẽ import vô Router như thế nào để khi login vào Router thì phải được authentication rsa.
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.