<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
    主站蜘蛛池模板: 精品久久久久久久免费人妻| 6080午夜一级毛片免费看| 国产男女猛烈无遮档免费视频网站 | 亚洲va无码专区国产乱码| 一区免费在线观看| 亚洲国产日韩成人综合天堂 | 精选影视免费在线 | 五月婷婷亚洲综合| 巨胸喷奶水视频www免费视频 | 亚洲人成网站影音先锋播放| 暖暖日本免费中文字幕| 亚洲福利视频导航| 最近高清中文字幕免费| 亚洲中文字幕无码一去台湾| 午夜电影免费观看| 黄网站色视频免费观看45分钟| 亚洲AV无码乱码在线观看牲色| 一级一看免费完整版毛片| 亚洲欧洲无码AV电影在线观看| 国产自国产自愉自愉免费24区| 亚洲午夜久久久精品影院| 久久WWW免费人成人片| 国产精品亚洲а∨无码播放不卡| 中文字幕久久亚洲一区| 久久久久久AV无码免费网站下载 | 水蜜桃视频在线观看免费| 色se01短视频永久免费| 亚洲日本VA中文字幕久久道具| 免费一级毛片正在播放| 91成人免费福利网站在线| 亚洲妓女综合网99| 亚洲国产成人五月综合网| 免费国产成人午夜在线观看| 亚洲人成电影网站久久| 亚洲一区二区视频在线观看 | 亚洲综合精品成人| 国产午夜亚洲精品国产成人小说| 精品一区二区三区无码免费视频| 亚洲第一综合天堂另类专| 亚洲精品国精品久久99热一| a级毛片无码免费真人|