Các loại password trên router Cisco
Các loại password trên router Cisco
Nội dung bài 4:
– Đặt password Console
– Đặt password enable
– Đặt password telnet
– Mã hóa các password đã đặt
Chi tiết thực hiện:
Các loại password đăng nhập trong Cisco
1. Mật khẩu Console: Cổng Console dùng trong trường hợp
– Cấu hình lần đầu tiên
– Recovery mật khẩu
– Cài đặt, nâng cấp IOS
Đặt mật khẩu truy cập cho cổng consol trên router nhằm giới hạn người dùng truy xuất Router/switch qua cổng này.
Các bước cấu hình:
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#line console 0
Router(config-line)#password yourpassword
Router(config-line)#login
Router(config-line)#exit
Sau khi reload lại router thì IOS yêu cầu nhập mật khẩu vừa đặt
Press RETURN to get started.
User Access Verification
Password: bạn nhập mật khẩu vừa đặt (chú ý là mật khẩu không hiển thị gì trên giao diện cả)
Router#
2. Mật khẩu telnet: Dùng để bảo mật cho đăng nhập từ xa vào Router.
Ví dụ như mô hình, bạn ngồi từ Pc06 vẫn có thể telnet đến Router/switch và làm việc qua giao diện dòng lệnh (có thể mạng LAN hoặc là mạng Internet, miễn là bạn có thể liên lạc được với Router)
Router#configure terminal
Router(config)#
Router(config)#line vty 0 4 ← cho phép 5 máy truy cập cùng lúc
Router(config-line)#password yourmatkhautelnet
Router(config-line)#login
Router(config-line)#end
Router#exit
Tại các máy tính trong mạng hoặc các router khác, ta dùng các công cụ có hỗ trợ dịch vụ telnet như puty
3. Mật khẩu chế độ enable: Dùng để bảo mật cho đăng nhập vào “global configuration mode”, Có hai loại, mật khấu không mã hóa và mật khẩu mã hóa, nếu đặt hai loại mật khẩu cùng lúc thì loại mật khẩu không mã hóa sẽ không còn hiệu lực thay vào đó mật khẩu dạng “enable secret”sẽ được hỏi để được quyền đăng nhập
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#enable password yourmatkhauenable <—Dạng pass không mã hóa
Router(config)#enable secret yourmatkhausecret <—Dạng pass mã hóa
Router(config)# end
Router con0 is now available
Press RETURN to get started.
User Access Verification
Password: “nếu đặt cùng lúc password ở trên thì password matkhausecret sẽ đăng nhập được vào hệ thống vì được ưu tiên”
4. Câu lệnh để mã hóa toàn bộ password được đặt
Router#
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#service password-encryption ← Dùng mã hóa toàn bộ các loại password
5. Show kiểm tra kết quả
Router#show runn
Building configuration…
Current configuration : 1144 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname Router
!
enable secret 5 $1$mERr$4Tbo8GSFVVzqEHDXohOb7/
enable password 7 0838435B1B14040319030D112F25252A3F30
!
interface Vlan1
no ip address
shutdown
line con 0!
line vty 0 4
login
line vty 5 15
login
!
!
end
