rsh命令配置于使用

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

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

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

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

如下:

rexec

# default: off
# description: 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
{
  socket_type   = stream
  wait      = no
  user      = root
  log_on_success    += USERID
  log_on_failure    += USERID
  server      = /usr/sbin/in.rexecd
  disable     = no
}

rlogin

# default: on
# description: 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
{
        socket_type             = stream
        wait                    = no
        user                    = root
        log_on_success          += USERID
        log_on_failure          += USERID
        server                  = /usr/sbin/in.rlogind
        disable                 = no
}

rsh

# default: on
# description: 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/pam.d/下的rlogin、rexec、rsh三个文件,将里面的#auth       required     pam_securetty.so这行注释掉,使得root用户可以远程登录。

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

转载于:https://www.cnblogs.com/cqdxwjd/p/9862520.html

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值