CentOS中怎么配置ssh系統,很多新手對此不是很清楚,為了幫助大家解決這個難題,下面小編將為大家詳細講解,有這方面需求的人可以來學習下,希望你能有所收獲。
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 [ 確定 ]
看完上述內容是否對您有幫助呢?如果還想對相關知識有進一步的了解或閱讀更多相關文章,請關注億速云行業資訊頻道,感謝您對億速云的支持。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。