安装环境:一台centos6.10虚拟机,一台centos7.5虚拟机,全部使用root用户登录。

两台机器上都要安装rsh、rsh-server、xinetd包。

两台机器都要关闭防火墙并配置/etc/hosts映射。

修改/etc/xinetd.d/下的三个文件,rlogin,rexec,rsh,将里面的disable=yes改为disable=no。如果没有这三个文件,创建即可。

如下:

rexec

  1. # default: off
  2. # description: Rexecd is the server for the rexec() routine. The server \
  3. # provides remote execution facilities with authentication based \
  4. # on user names and passwords.
  5. service exec
  6. {
  7. socket_type = stream
  8. wait = no
  9. user = root
  10. log_on_success += USERID
  11. log_on_failure += USERID
  12. server = /usr/sbin/in.rexecd
  13. disable = no
  14. }

rlogin

  1. # default: on
  2. # description: rlogind is the server for the rlogin() program. The server \
  3. # provides a remote login facility with authentication based on \
  4. # privileged port numbers from trusted hosts.
  5. service login
  6. {
  7. socket_type = stream
  8. wait = no
  9. user = root
  10. log_on_success += USERID
  11. log_on_failure += USERID
  12. server = /usr/sbin/in.rlogind
  13. disable = no
  14. }

rsh

  1. # default: on
  2. # description: The rshd server is the server for the rcmd() routine and, \
  3. # consequently, for the rsh() program. The server provides \
  4. # remote execution facilities with authentication based on \
  5. # privileged port numbers from trusted hosts.
  6. service shell
  7. {
  8. disable = no
  9. socket_type = stream
  10. wait = no
  11. user = root
  12. log_on_success += USERID
  13. log_on_failure += USERID
  14. server = /usr/sbin/in.rshd
  15. }

然后修改/etc/pam.d/下的rlogin、rexec、rsh三个文件,将里面的#auth       required     pam_securetty.so这行注释掉,使得root用户可以远程登录。

然后再两台机器上重启xinetd服务即可互相登录了。

rsh命令配置于使用的更多相关文章

  1. 用srvctl命令配置service

    .用srvctl命令配置service 除了用DBCA图形方式,还能够使用命令方式配置service,这样的方法对于维护远程尤事实上用.不管是创建还是维护都是用一个命令srvctl,先看一下srvct ...

  2. centos MySQL主从配置 ntsysv chkconfig setup命令 配置MySQL 主从 子shell MySQL备份 kill命令 pid文件 discuz!论坛数据库读写分离 双主搭建 mysql.history 第二十九节课

    centos  MySQL主从配置 ntsysv   chkconfig  setup命令  配置MySQL 主从 子shell  MySQL备份  kill命令  pid文件  discuz!论坛数 ...

  3. linux命令配置IP详解

    在Linux系统中,TCP/IP网络是通过若干个文本文件进行配置的,有时需要编辑这些文件来完成联网工作. vi /etc/sysconfig/network-scripts/ifcfg-eth0 :进 ...

  4. webpack正式、测试环境接口地址本地运行及打包命令配置

    声明:本文由w3h5原创,转载请注明出处:<webpack正式.测试环境接口地址本地运行及打包命令配置> https://www.w3h5.com/post/521.html 为了方便开发 ...

  5. Tomcat学习笔记 - 错误日志 - Tomcat安装版安装后第二次启动后闪退(转)-- javac不是内部或外部命令 -- 配置java环境教程

    如果安装成功并且安装完成第一次启动是成功的,第二次就闪退的话,原因之一是没有配置java的环境.在网上找的配制方法有很多错误,测试javac命令时候会提示不是内部或外部命令,找到一个正确的教程.如下, ...

  6. 命令配置linux分辨率

    1. xrandr 使用该命令列举系统支持的分辨率 2. xrandr -s 回复原来的分辨率 3. xrandr -s 1360x768 设置分辨率   如果分辨率没能锁定,请在根目录使用gedit ...

  7. 使用Codis-Admin命令配置环境

    前提条件:由于22.35.60服务器各自配置了Codis-Service主机,所以22.35.60对应的ip和端口要求能通信和互信访问,为下面通过60的dashboard配置22.35.60实现分组. ...

  8. 使用cron命令配置定时任务(cron jobs)

    原文 http://www.cnblogs.com/end/archive/2012/02/21/2361741.html 开机就启动cron进程的设置命令:chkconfig --add crond ...

  9. ubuntu 命令配置ip 网关 dns

    如果是在虚拟机中使用Ubuntu,先设置好主机的网络,然后配置虚拟机Ubuntu的IP和网关 如果主机操作系统就是Ubuntu,请直接参照下文进行设置 内容如下: 1. 检验是否可以连通,就使用pin ...

随机推荐

  1. 2017-5-14 湘潭市赛 Partial Sum 给n个数,每次操作选择一个L,一个R,表示区间左右端点,该操作产生的贡献为[L+1,R]的和的绝对值-C。 0<=L<R<=n; 如果选过L,R这两个位置,那么以后选择的L,R都不可以再选择这两个位置。最多操作m次,求可以获得的 最大贡献和。

    Partial Sum Accepted : Submit : Time Limit : MS Memory Limit : KB Partial Sum Bobo has a integer seq ...

  2. UVa 12563 劲歌金曲 刘汝佳第二版例题9-5;

    Problem J Jin Ge Jin Qu [h]ao (If you smiled when you see the title, this problem is for you ^_^) Fo ...

  3. json responseJson

    private void doResoponseJson(HttpServletResponse resp,String jsonString){ Trace.logError(Trace.COMPO ...

  4. Unity3D学习笔记——NGUI之UIScrollBar

    UIScrollBar:这个组件可以用于创建滚动条. 效果图如下: 一:使用步骤 1.这个组件和UISlider很像,也是由三部分组成. 2.首先创建一个Sprite用于组件的背景色. 3.创建第二个 ...

  5. mongo 过滤查询条件后分组、排序

    描述:最近业主有这么一个需求,根据集合中 时间段进行过滤,过滤的时间时间段为日期类型字符串,需要根据某一日期进行截取后.进行分组,排序 概述题目:根据createTime时间段做查询,然后以 天进行分 ...

  6. PID file found but no matching process was found. Stop aborted

    一般脚本部署时不会遇到这种情况,有时候自个手动处理会出现”PID file found but no matching process was found. Stop aborted”,根据意思就可以 ...

  7. 构造三层时报错“程序 “D:\MyTest\....”不包含适合于入口点的静态"Main"方法”

    错误 1 程序“D:\MyTest\EBookShop\Model\obj\x86\Debug\Model.exe”不包含适合于入口点的静态“Main”方法 原因:原来创建项目的时候,用的是“空项目” ...

  8. jQuery EasyUI介绍

    官方定义:http://www.jeasyui.com/ what is JQuery EasyUI ? jQuery EasyUI framework helps you build your we ...

  9. Java多线程的两种实现方式

    Java总共有两种方式实现多线程 方式1:通过继承Thread类的方式 package com.day04; /** * 通过继承Thread类并复写run方法来是实现多线程 * * @author ...

  10. extract

    w http://php.net/manual/en/function.extract.php <?php /* Suppose that $var_array is an array retu ...