国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 服務器 > Web服務器 > 正文

Ubuntu下安裝rsh實現無密碼訪問詳解

2024-09-01 13:51:16
字體:
來源:轉載
供稿:網友

一、環境

1.三臺服務器ubuntu14.04, 主機名分別為compute,block1和blcok2

2.兩臺主機hosts文件都為:
root@compute:~# cat /etc/hosts
127.0.0.1 localhost
192.168.4.132 compute
192.168.4.133 block1
192.168.4.134 block2

二、安裝rsh和rsh-server(三臺主機都安裝),并設置啟動rsh和rlogin服務

1 安裝

apt-get install rsh-client rsh-server xinetd 

2 ubuntu下原來沒有/etc/xinetd.d/rsh文件,新建并添加內容

# default: on # descrīption: The rshd server is the server for the rcmd(3) routine and, / #    consequently, for the rsh(1) program. The server provides / #    remote execution facilities with authentication based on / #    privileged port numbers from trusted hosts. service shell {     disable = no     socket_type       = stream     wait          = no     user          = root     log_on_success     += USERID     log_on_failure     += USERID     server         = /usr/sbin/in.rshd }  /etc/xinetd.d/rlogin  # default: on # descrīption: rlogind is the server for the rlogin(1) program. The server / #    provides a remote login facility with authentication based on / #    privileged port numbers from trusted hosts. service login {     disable = no     socket_type       = stream     wait          = no     user          = root     log_on_success     += USERID     log_on_failure     += USERID     server         = /usr/sbin/in.rlogind }  /etc/xinetd.d/rexec  # default: off # descrīption: Rexecd is the server for the rexec(3) routine. The server / #    provides remote execution facilities with authentication based / #    on user names and passwords. service exec {     disable = no     socket_type       = stream     wait          = no     user          = root     log_on_success     += USERID     log_on_failure     += USERID     server         = /usr/sbin/in.rexecd } 

3 重啟動

root@block2:~# /etc/init.d/xinetd restart xinetd stop/waiting xinetd start/running, process 26181 

三、建立信任文件,實現無密碼訪問配置

1.在root主目錄下建立.rhosts文件,并在此文件內寫入這兩臺主機的主機名

root@block1:~# cat .rhosts  compute root block1 root block2 root 

注:root 驗證需要/root/.rhosts文件,普通用戶需要/etc/hosts.equiv文件

2.在/etc目錄下建立hosts.equiv文件,并在此文件內寫入作為客戶端主機的主機名

root@block1:~# cat /etc/hosts.equiv  # /etc/hosts.equiv: list of hosts and users that are granted "trusted" r #      command access to your system . compute 

3 在文件/etc/securetty中

加入rsh rlogin rexec

四、配置完畢,驗證配置

1.在compute服務器上直接輸入rsh block1 date就可以在block1上無密碼執行date命令

root@compute:~# rsh block2 date Thu Mar 30 16:38:42 CST 2017 

2.在compute上直接輸入rsh block1就可以無密碼登錄block1
3.普通用戶操作同root用戶
4.還有rcp命令可以遠程復制文件
至此rsh無密碼訪問配置完畢。

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持VEVB武林網。


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 如东县| 鲁山县| 富源县| 麦盖提县| 咸阳市| 景宁| 滨海县| 托里县| 沈丘县| 巴彦淖尔市| 辽源市| 贵阳市| 和田市| 太仆寺旗| 青州市| 阳朔县| 浮梁县| 新干县| 仙居县| 屯昌县| 神农架林区| 南部县| 射洪县| 宝清县| 乌鲁木齐县| 阿尔山市| 阳西县| 贵南县| 乌拉特前旗| 垦利县| 三都| 运城市| 兴国县| 桂平市| 建阳市| 郎溪县| 遵义市| 沾化县| 甘泉县| 土默特右旗| 垫江县|