大旗谷资源网 Design By www.zqyou.com
一、环境
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无密码访问配置完毕。
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。
标签:
Ubuntu,rsh
大旗谷资源网 Design By www.zqyou.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
大旗谷资源网 Design By www.zqyou.com
暂无Ubuntu下安装rsh实现无密码访问详解的评论...
更新日志
2024年09月20日
2024年09月20日
- [ABC]安娜-胆麦发烧女声[6N纯银镀膜][2016[低速原抓WAV+CUE]
- 任天堂今晚举行直面会!第三方及独立游戏展示
- 《哆啦A梦的铜锣烧店物语》发售!开罗公式+哆啦A梦
- 任天堂公布《塞尔达传说》系列时间线:野炊与王泪独立在外
- 五条人.2012-一些风景2CD【刀马旦】【WAV+CUE】
- 陈奕迅.2013-Easons.Life演唱会2CD(2024环球红馆40复刻系列)【环球】【WAV+CUE】
- 许美静.1995-遗憾(新马版)【上华】【WAV+CUE】
- 《叶倩文 歌声情缘》[WAV+CUE][410MB]
- 《张国荣 首首动听经典不容错过 追忆的风 2CD》[WAV+CUE][870MB]
- 《腾格尔 容中尔甲 亚东 高原三星 男人篇 3CD》[WAV/分轨][1GB]
- 命运圣契公测实测可用兑换码大全 命运圣契最新兑换码分享
- 黑神话悟空上品疾蝠精魄获取方法一览|上品疾蝠精魄收集攻略
- 《七龙珠电光炸裂!ZERO》GT角色预告片曝光,15位新角色登场
- [ABC]安娜-胆麦发烧女声[6N纯银镀膜][2016[低速原抓WAV+CUE]
- NewViennaOctetViennaWindSoloists-TheDeccaRecordings(2024)18CD[24-48][FLAC]-7