Windows XP Windows 7 Windows 2003 Windows Vista Windows教程綜合 Linux 系統教程
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟件教程
 Windows教程網 >> Linux系統教程 >> Linux教程 >> CentOS配置ssh系統技術

CentOS配置ssh系統技術

日期:2017/2/7 9:20:46      編輯:Linux教程

CentOS配置ssh已被廣泛應用但是也在不斷的更新,這裡介紹CentOS配置ssh安裝設置使用,幫助大家安裝更新CentOS配置ssh系統。絕大部分內容適用於CentOS /RHEL ,同時也適用於其他發行版本。

  在VMware安裝一個CentOS的Sever版,終端裡的內容不可滾動,不方便。在win下遠程登錄不錯(win下有個Xshell)。默認安裝ssh是有的。只是hosts訪問問題。

  1.在hosts.deny文件尾添加CentOS配置ssh:ALL意思是拒絕所有訪問請求[root@localhost ~]# vi /etc/hosts.deny修改後看起來如下:

  hosts.denyThis file describes the names of the hyusaosts 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文件尾添加CentOS配置ssh: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.重啟CentOS配置ssh

  [root@localhost ~]# /etc/rc.d/init.d/sshd restart

  停止 ssh [ 確定 ]

  啟動 ssh [ 確定 ]

  以上介紹CentOS配置ssh。

Copyright © Windows教程網 All Rights Reserved