返回頂部

思科CNNA中文教程 - 第三章用戶訪問和權限管理(上)

  3.1 設置用戶和密碼

  提問 為每個單獨的人員設置不同的用戶名和密碼

  回答

  Router1#configure terminal

  Enter configuration commands,one per line.End with CNTL/Z.

  Router1(config)#username neoshi password ioscookbook (username weak nopassword)

  Router1(config)#aaa new-model

  Router1(config)#aaa authentication login local_auth cocal

  Router1(config)#line vty 0 4

  Router1(config-line)#login authentication local_auth

  Router1(config-line)#exit

  Router1#

  注釋 設置單獨的用戶名和密碼的好處就不用多說了,這里只是提一個就是在日志中會顯示誰做了修改,比如%SYS-5-RELOAD:Reload requested by kdooley on vty0 (172.25.1.1).另外在username這個命令里面還有一個autocommand的選項,實現登錄以后自動執行某個特定的命令的作用,下面的例子就是一個用戶名為run無密碼,登陸以后顯示完端口狀態就自動退出的例子,很好用吧

  Router1#configure terminal

  Enter configuration commands,one per line.End with CNTL/Z.

  Router1(config)#aaa new-model

  Router1(config)#aaa authentication login default local

  Router1(config)#aaa authorization exec default local

  Router1(config)#username run nopassword noescape

  Router1(config)#username run autocommand show ip interface brief

  Router1(config)#end

  Router1#

  3.2 加密密碼

  提問 加密密碼從而在配置文件中不明文顯示

  回答

  Router1#configure terminal

  Enter configuration commands,one per line.End with CNTL/Z.

  Router1(config)#enable password oreilly

  Router1(config)#line vty 0 4

  Router1(config-line)#password cookbook

  Router1(config-line)#line con 0

  Router1(config-line)#password cookbook

  Router1(config-line)#line aux 0

  Router1(config-line)#password cookbook

  Router1(config-line)#exit

  Router1(config)#service password-encryption

  Router1(config)#end

  Router1#

  注釋 這種加密方式很弱,很容易被破解

  3.3 Using Better Password-Encryption Techniques

  提問 使用強度高的加密方式而不是思科缺省的加密技術

  回答

  Router1#configure terminal

  Enter configuration commands,one per line.End with CNTL/Z.

  Router1(config)#enable secret ORAbooks

  Router1(config)#end

  Router1#

  在IOS 12.2(8)T后也可以對username的密碼做高強度的加密

  Router#configure terminal

  Enter configuration commands,one per line.End with CNTL/Z.

  Router(config)#username ijbrown secret oreilly

  Router(config)#end

  Router#

  注釋 由于這種加密方式使用的是MD5所以破解難度相對增大了。對于enable secret的密碼有個小技巧就是密碼設定正常沒有?不過可以通過^V+?的方式來輸入。

  3.4 移去配置文件中的密碼信息

  提問 不想在配置文件中顯示密碼

  回答 使用腳本略去

  注釋 簡單的用show tech命令也可以

  3.5 解密思科的弱密碼

  提問 破解思科缺省的密碼算法

  回答 使用腳本略去

  注釋 可以使用BOSON網站上的免費工具

  3.6 顯示當前登錄用戶

  提問 顯示當前登錄設備的用戶

  回答

  Router1#show users (who)

  注釋 無

  3.7 發信息給其它用戶

  提問 試圖發送信息給登錄在同一設備的其他用戶

  回答

  Router1#send *

  Router1#send console 0

  Router1#send vty 2

  Router1#send 66

  注釋 很好用的特性,比如當你重啟的時候需要告訴別人,文本信息^+Z結束

思科CNNA中文教程 - 第三章用戶訪問和權限管理(上)

  3.8 修改可用VTY數目

  回答

  Router1#configure terminal

  Enter configuration commands,one per line.End with CNTL/Z.

  Router1(config)#line vty 0 9

  Router1(config-line)#exit

  Router1(config)#end

  Router1#

  注釋 缺省可登錄vty數目為5,不能刪除,對于增加的可以使用no line vty x刪除,不能刪除單獨的vty,是刪除所有大于x的vty

  3.9 修改VTY的超時時長

  提問 修改超時避免用戶登錄超時被系統斷開

  回答

  Router1#configure terminal

  Enter configuration commands,one per line.End with CNTL/Z.

  Router1(config)#line vty 0 4

  Router1(config-line)#exec-timeout 0 0 (exec-timeout 240 0)

  Router1(config-line)#exit

  Router1(config)#end

  Router1#

  注釋 缺省用戶10分鐘空閑就會被踢掉系統,0 0 可以用不超時,第一個0 是分鐘,第二個0 是秒。同時為了防止有些用戶掉死但是還占用vty端口的情況,建議使用下面命令來防止:

  Router1#configure terminal

  Enter configuration commands,one per line.End with CNTL/Z.

  Router1(config)#service tcp-keepalives-in

  Router1(config)#end

  Router1#

  3.10 限制用戶登錄可以使用的協議

  提問 只允許用戶用特定的協議來進行系統登錄

  回答

  Router1#configure terminal

  Enter configuration commands,one per line.End with CNTL/Z.

  Router1(config)#line vty 0 4

  Router1(config-line)#transport input telnet

  Router1(config-line)#exit

  Router1(config)#end

  Router1#

  注釋 缺省情況下除了可以telnet登錄,還支持以下協議登錄lat pad v120 lapb-ta rlogin ssh

  3.11 配置用戶登錄可用總時長Enabling Absolute Timeouts on VTY Lines

  提問 對用戶登錄總時長進行限制,不論是否在空閑還是活動

  回答 Router1#configure terminal

  Enter configuration commands,one per line.end with CNTL/Z.

  Router1(config)#line vty 0 4

  Router1(config-line)#absolute-timeout 5

  Router1(config-line)#logout-warning 30

  Router1(config-line)#exit

  Router1(config)#end

  Router1#

  注釋 無

 



400-0806-056
主站蜘蛛池模板: 亚洲国产成人五月综合网| 久久综合88熟人妻| 丁香色欲久久久久久综合网| 久久久久综合中文字幕| 亚洲欧美日韩综合二区三区| 国产欧美日韩综合精品一区二区| 精品综合久久久久久888蜜芽| 伊人久久大香线蕉综合5g| 九九久久99综合一区二区| 夜鲁鲁鲁夜夜综合视频欧美| 99久久国产综合精品五月天喷水| 久久99国产综合精品免费| 久久综合久久综合久久综合| 激情综合色五月六月婷婷| 亚洲综合久久综合激情久久| 99热婷婷国产精品综合| 色欲香天天天综合网站| 狠狠色丁香婷婷综合久久来| 久久综合亚洲色HEZYO国产| 狠狠色婷婷综合天天久久丁香| 狠狠狠色丁香婷婷综合久久五月| 国产综合色产在线精品| 国产在线五月综合婷婷| 欧美国产日韩另类综合一区| 久久91精品久久91综合| 天天干天天射综合网| 亚洲av一综合av一区| 欧洲 亚洲 国产图片综合| 激情综合色综合啪啪开心| 色天使久久综合网天天| 久久亚洲欧洲国产综合| 在线综合亚洲中文精品| 色婷婷综合久久久久中文字幕| 久久综合亚洲欧美成人| 99久久国产综合精品女同图片| 欧美日韩在线精品一区二区三区激情综合| 色五月丁香六月欧美综合图片| 国产成人综合亚洲AV第一页| 亚洲五月综合缴情在线观看| 九九久久99综合一区二区| 一本久道久久综合狠狠躁AV|