關(guān)于CentOS配置ssh系統(tǒng)技能介紹
由于越來越多的人使用CentOS操作系統(tǒng),而且CentOS配置ssh已被廣泛運(yùn)用,但是也在不斷的更新。存在著很多不是很專業(yè)的人士對(duì)這方面的知識(shí)還是存在著很多的疑問。這次,在這里推選CentOS配置ssh安裝配置運(yùn)用,幫助大眾安裝更新CentOS配置ssh系統(tǒng)。絕大部分內(nèi)容適用于CentOS /RHEL ,同時(shí)也適用于其他發(fā)行版本。
在VMware安裝一個(gè)CentOS的Sever版,終端里的內(nèi)容不可滾動(dòng),不簡潔。在win下遠(yuǎn)程登錄不錯(cuò)(win下有個(gè)Xshell)。默認(rèn)安裝ssh是有的。只是hosts訪問疑問。
1.在hosts.deny文件尾添加CentOS配置ssh:ALL意思是拒絕所有訪問請(qǐng)求[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. 意思是準(zhǔn)許 192.168.0.1 到254的主機(jī),內(nèi)網(wǎng)。
[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 [ 確定 ] 啟動(dòng) ssh [ 確定 ] 以上推選 CentOS配置ssh。
【編輯推薦】