Ubuntu下安装rsh实现无密码访问
一:环境
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 = nosocket_type = streamwait = nouser = rootlog_on_success += USERIDlog_on_failure += USERIDserver = /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 = nosocket_type = streamwait = nouser = rootlog_on_success += USERIDlog_on_failure += USERIDserver = /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 = nosocket_type = streamwait = nouser = rootlog_on_success += USERIDlog_on_failure += USERIDserver = /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实现无密码访问相关推荐
- Ubuntu下安装mdbtools并访问mdb文件
Ubuntu下安装mdbtools并mdb文件访问: 1.安装mdb工具 sudo apt install mdbtools mdbtools-gmdb 2.安装完后可以使用相应命令来查看mdb文件, ...
- Ubuntu 下安装thttpd Web服务器
不知道大家是不是真的需要用appache这么复杂的功能这么强大的web server,其实有很多时候使用webserver也只是一种远程共享访问的方式.这里,Ubuntu repository的提供了 ...
- Ubuntu下安装Apache+PHP+Mysql
Ubuntu下安装 apache+php+mysql文本服务器! ------------------------------------------------------------------- ...
- ubuntu下安装windows虚拟机
ubuntu下安装win7虚拟机总结 ubuntu16.04 虚拟机 安装win7/win10 http://WIN10:你不能访问此共享文件夹,解决方法 VirtualBox虚拟机剪贴板共享
- Ubuntu下安装配置Open×××
Ubuntu下安装配置Open××× 时间:2009-02-11 21:03来源:http://www.kklinux.com 作者:看看Linux 点击:2664次 1. 安装 Ubuntu中安装O ...
- Docker最全教程之Ubuntu下安装Docker(十五)
前言 Ubuntu是一个以桌面应用为主的开源GNU/Linux操作系统,应用很广.本篇主要讲述Ubuntu下使用SSH远程登录并安装Docker,并且提供了Docker安装的两种方式,希望对大家有所帮 ...
- Ubuntu下安装Nginx服务器并进行优化
一.Nginx介绍 Nginx是由俄罗斯人开发的一款高性能的Web和反向代理服务器,它也可以作为电子邮件的反向代理服务器.其以稳定.并发能力强.占用资源少等显著特点备受广大互联网公司青睐. Ngi ...
- 在windows和ubuntu下安装Syncthing
Syncthing 一个可以用在不同设备之间,同步文件的工具. window下安装 有客户端版本的,由社区维护,我下下来试了下,没有跟到最新版本,看其他文章好像有 bug ,而且大佬也给出了其他的方案 ...
- 【记录】ubuntu下安装和部署RAP2
ubuntu下安装和部署RAP2 1. 后台部署 1.1 安装mysql和redis $ sudo apt update $ sudo apt install mysql-server $ sudo ...
最新文章
- XML的二十个热点问题
- [C++]C++中的IO类
- 在Ubuntu16.04上安装CUDA
- 上海市提出IDC建设指导意见,新建IDC限制PUE1.3以下
- ble mac地址 协议_BLE获取iphone mac地址的方法--【sky原创】
- C++建立队列_利用链表
- matlab单位冲击序列代码,matlab产生单位冲击序列 matlab单位冲激函数代码
- telnet不是内部命令
- 培训班出身的程序员,未来何去何从?
- 基金定投应该什么时候终止?
- 百度云sugar上怎么可视化展示数据?
- 四川大学计算机与生命科学专业,四川大学生命科学学院2014年研招专业目录
- Behavior tree 编程实战
- mysql按月份分组查询_mysql如何按月份分组查询
- 超全!互联网大厂职级薪资表,全国各地互联网大厂分布(校招/社招/考研/考公)
- VC学习资料收集(12):VC小知识总结
- java-net-php-python-jsp学生党团管理信息系统2020演示录像计算机毕业设计程序
- 科研日志——使用opencv提取视频中的人脸
- 给定桩号获取纵断面中的高程值(c# for civil3d)
- 解决“spring-boot-maven-plugin”报红