zoukankan      html  css  js  c++  java
  • Linux RSH主机互信配置

    Enabling rsh for Linux

    The following section describes how to enable remote shell.

    Symantec recommends configuring a secure shell environment for Veritas InfoScale product installations.

    See Manually configuring passwordless ssh.

    See the operating system documentation for more information on configuring remote shell.

    To enable rsh for rhel6/sles

    1. To ensure that the rsh and rsh-server RPMs are installed, type the following command:
      # rpm -qa | grep -i rsh

      If it is not already in the file, type the following command to append the line "rsh" to the /etc/securetty file:

      # echo "rsh" >> /etc/securetty
    2. Modify the line disable = no in the /etc/xinetd.d/rsh file.
    3. In the /etc/pam.d/rsh file, change the "auth" type from "required" to "sufficient":
      auth     sufficient
    4. Add the "promiscuous" flag into /etc/pam.d/rsh and /etc/pam.d/rlogin after item "pam_rhosts_auth.so".
    5. To enable the rsh server, type the following command:
      # chkconfig rsh on
    6. Modify the .rhosts file. Each line of the .rhosts file contains a fully qualified domain name or IP address for each remote system. This file also contains the name of a user having access to the local system. For example, if the root user must remotely access sys1 from sys2, add an entry for sys2.companyname.com to the .rhosts file on sys1 by typing the following command:
      # echo "sys2.companyname.com" >> $HOME/.rhosts
    7. Install the Veritas InfoScale product.

    To disable rsh for rhel6/sles

    1. Remove the "rsh" entry in the /etc/securetty file.
    2. Disable the rsh server by typing the following command:
      # chkconfig rsh off
    3. After you complete an installation procedure, delete the .rhosts file from each user's $HOME directory to ensure security:
      # rm -f $HOME/.rhosts

    To enable rsh for rhel7

    • Run the following commands to enable rsh passwordless connection:
      # systemctl start rsh.socket
      # systemctl start rlogin.socket
      # systemctl enable rsh.socket 
      # systemctl enable rlogin.socket 
      # echo rsh >> /etc/securetty
      # echo rlogin >> /etc/securetty
      #echo "+ +" >> /root/.rhosts		

    To disable rsh for rhel7

    • Run the following commands to disable rsh passwordless connection:
      # systemctl stop rsh.socket
      # systemctl stop rlogin.socket
      # systemctl disable rsh.socket 
      # systemctl disable rlogin.socket 
  • 相关阅读:
    rsync命令使用方法
    Mysql(MyISAM和InnoDB)及Btree和索引优化
    初级java程序员-各公司技能要求
    Redis学习笔记二 (BitMap算法分析与BitCount语法)
    HTTP、TCP、IP协议常见面试题
    Redis学习笔记一(Redis的详细安装及Linux环境变量配置和启动)
    java-部分精选面试题
    Python基础-TypeError:takes 2 positional arguments but 3 were given
    Python3.7中urllib.urlopen 报错问题
    几道关于springboot、springCloud的面试题。
  • 原文地址:https://www.cnblogs.com/lixiaochun/p/8554030.html
Copyright © 2011-2022 走看看