<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-153  評論-235  文章-19  trackbacks-0
            在VMware安裝一個CentOS的Sever版,終端里的內容不可滾動,不方便。在win下遠程登錄不錯(win下有個Xshell)。默認安裝ssh是有的。只是hosts訪問問題。

    1.在hosts.deny文件尾添加sshd:ALL
    意思是拒絕所有訪問請求
    [root@localhost ~]# vi /etc/hosts.deny

    修改后看起來如下:
    #
    #
     hosts.deny    This file describes the names of the hosts which are
    #
                   *not* allowed to use the local INET services, as decided
    #
                   by the '/usr/sbin/tcpd' server.
    #
    #
     The portmap line is redundant, but it is left to remind you that
    #
     the new secure portmap uses hosts.deny and hosts.allow.  In particular
    #
     you should know that NFS uses portmap!
    sshd:ALL

    2.在hosts.allow文件尾添加sshd:192.168.0.
    意思是允許192.168.0.1 到254的主機,內網。
    [root@localhost ~]# vi /etc/hosts.allow 
    #
    #
     hosts.allow   This file describes the names of the hosts which are
    #
                   allowed to use the local INET services, as decided
    #
                   by the '/usr/sbin/tcpd' server.
    #
    sshd:192.168.0.

    3.重啟ssh
    [root@localhost ~]# /etc/rc.d/init.d/sshd restart
    停止 sshd:                                                [  確定  ]
    啟動 sshd                                                  [  確定  ]


    好了,用putty和Xshell(Xmanager)可以登錄了。^_^

    4.ssh增強配置
    [root@localhost ~]# vi /etc/ssh/sshd_config  ← 用vi打開SSH的配置文件

    #Protocol 2,1 ← 找到此行將行頭“#”刪除,再將行末的“,1”刪除,只允許SSH2方式的連接
     
    Protocol 
    2 ← 修改后變為此狀態,僅使用SSH2

    #ServerKeyBits 768 ← 找到這一行,將行首的“#”去掉,并將768改為1024
     
    ServerKeyBits 
    1024 ← 修改后變為此狀態,將ServerKey強度改為1024比特

    #PermitRootLogin yes  ← 找到這一行,將行首的“#”去掉,并將yes改為no
     
    PermitRootLogin no  ← 修改后變為此狀態,不允許用root進行登錄

    #PasswordAuthentication yes ← 找到這一行,將yes改為no
     
    PasswordAuthentication no ← 修改后變為此狀態,不允許密碼方式的登錄

    #PermitEmptyPasswords no  ← 找到此行將行頭的“#”刪除,不允許空密碼登錄
     
    PermitEmptyPasswords no  ← 修改后變為此狀態,禁止空密碼進行登錄

    參考: http://www.centospub.com/make/sshd.html
    posted on 2008-05-01 10:13 流浪汗 閱讀(12561) 評論(0)  編輯  收藏 所屬分類: Linux
    主站蜘蛛池模板: 精品一区二区三区无码免费视频 | 久久精品亚洲男人的天堂| 亚洲理论片在线观看| 18禁超污无遮挡无码免费网站| 国产亚洲视频在线播放| 两个人看的www视频免费完整版| 亚洲精品无码专区2| 一个人看www免费高清字幕| 亚洲午夜无码AV毛片久久| 男女一进一出抽搐免费视频| 亚洲愉拍99热成人精品热久久 | 中文字幕av免费专区| 亚洲国产精品无码专区| 91久久青青草原线免费| 亚洲第一页在线观看| 毛片网站免费在线观看| 豆国产96在线|亚洲| 亚洲色一色噜一噜噜噜| 久久精品免费观看| 亚洲系列国产精品制服丝袜第| 好先生在线观看免费播放| 在线观看免费亚洲| 奇米影视亚洲春色| 最近中文字幕mv免费高清在线| 亚洲综合偷自成人网第页色| 国产亚洲精品免费| 爽爽爽爽爽爽爽成人免费观看| 亚洲神级电影国语版| 成人免费视频国产| 成全高清在线观看免费| 亚洲人成综合网站7777香蕉| 国产L精品国产亚洲区久久| 久久国产免费福利永久| 一级毛片正片免费视频手机看| 亚洲AV永久无码区成人网站| 99视频全部免费精品全部四虎 | 两个人看的www高清免费视频| 亚洲精品成人网站在线播放 | 中文字幕一区二区三区免费视频| 亚洲精品日韩中文字幕久久久| 免费一级毛片正在播放|