+86-135-5029-3426 sales@vinchin.com
logo
Vinchin Blog
Vinchin Blog Configuring RSH during DPF setup

Configuring RSH during DPF setup

2021-08-03

1. First configure the /etc/hosts on both machine A and machine B at the same time


2. The communication between DB2 DPF partitions can use RSH or SSH. The default is RSH, which can be changed by the environment.


The amount is set by db2set DB2RSHCMD, for example, db2set DB2RSHCMD=ssh, which means the setting is SSH.


The following focuses on the configuration steps of RSH.


2.1: Check whether the rsh server is installed (-----2 host operation)


server1:~ # rpm -aq |grep rsh


rsh-0.17-573.2


wondershaper-1.1a-229.2


rsh-server-0.17-573.2


2.2: Change the configuration file, set disable = no


/etc/xinetd.d/rsh


/etc/xinetd.d/rlogin


/etc/xinetd.d/rexec


server1:~ # cat /etc/xinetd.d/rsh ---- 2 host operations


# default: off


# description:


# The rshd server is a 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


{


socket_type = stream


protocol = tcp


flags = NAMEINARGS


wait = no


user = root


group = root


log_on_success += USERID


log_on_failure += USERID


server = /usr/sbin/tcpd


# server_args = /usr/sbin/in.rshd -L


server_args = /usr/sbin/in.rshd -aL


disable = no


}


server1:~ # cat /etc/xinetd.d/rlogin ---- 2 hosts operation


# default: off


# description:


# Rlogind is a server for the rlogin program. The server provides remote


# execution with authentication based on privileged port numbers from trusted


# host


#


service login


{


socket_type = stream


protocol = tcp


flags = NAMEINARGS


wait = no


user = root


group = root


log_on_success += USERID


log_on_failure += USERID


server = /usr/sbin/tcpd


server_args = /usr/sbin/in.rlogind


# server_args = /usr/sbin/in.rlogind -a


disable = no


}


server1:~ # cat /etc/xinetd.d/rexec ---- 2 host operations


# default: off


# description:


# Rexecd is the server for the rexec program. The server provides remote


# execution facilities with authentication based on user names and


# passwords.


#


service exec


{


socket_type = stream


protocol = tcp


flags = NAMEINARGS


wait = no


user = root


group = root


log_on_success += USERID


log_on_failure += USERID


server = /usr/sbin/tcpd


server_args = /usr/sbin/in.rexecd


disable = no


}


2.3: Edit hosts.equiv and .rhosts files ---- 2 hosts operation


/etc/ hosts.equiv


$HOME/.rhosts




server1:~ # cat /etc/hosts


#


# hosts This file describes a number of hostname-to-address


# mappings for the TCP/IP subsystem. It is mostly


# used at boot time, when no name servers are running.


# On small systems, this file can be used instead of a


# "named" name server.


# Syntax:


#


# IP-Address Full-Qualified-Hostname Short-Hostname


#


127.0.0.1 localhost


192.168.214.130 server1


dpfinst1@server1:~> id


uid=1000(dpfinst1) gid=1001(ugrp) groups=16(dialout),33(video),1001(ugrp)


cd $HOME - Need to use rsh user


dpfinst1@server1:~> cat .rhosts


+a --The host name in hosts


+b --The host name on hosts


server1:~ # cat /etc/hosts.equiv


#


# hosts.equiv This file describes the names of the hosts which are


# to be considered "equivalent", i.e. which are to be


# trusted enough for allowing rsh(1) commands.


#


# hostname


+a --The host name in hosts


+b --The host name on hosts



4: Start the rsh service


server1:~ # service xinetd restart


Shutting down xinetd: done


Starting INET services. (xinetd) done


Encountered a problem


db2inst@db21:~>


db2inst@db21:~> rsh db22 date


rcmd: socket: Permission denied


Solution:


chmod 4755 /usr/bin/rsh


chmod 4755 /usr/bin/rlogin

  • Tag:
  • Trending

Interested Blogs More
DOWNLOAD NOW YOU CAN ENJOY A 60-DAYS FULL-FEATURED FREE TRIAL !