Re: How to setup RSHD and start it for use with MPICH
From: Rene Girard (aa_at_bb.yy)
Date: 02/02/04
- Next message: Cameron Kerr: "Re: Iptables bridge"
- Previous message: Keith Keller: "Re: How to send a syslog message by E-mail?"
- In reply to: Cameron Kerr: "Re: How to setup RSHD and start it for use with MPICH"
- Next in thread: Cameron Kerr: "Re: How to setup RSHD and start it for use with MPICH"
- Reply: Cameron Kerr: "Re: How to setup RSHD and start it for use with MPICH"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 1 Feb 2004 22:18:27 -0500
Kerr,
Many thanks for your informative reply. I have tried what you have
proposed but
unfortunately I still have something wrong in my settings and also in my
understanding.
I would like to take few lines to explain better the problem I am trying to
solve.
I am trying to run MPICH on my Linux machine which has only one processor.
The process
that installs MPICH creates at least 5 virtual machines. Therefore as far as
I understand
when I run a MPI program (for example t_mpi1.c) with the command:
mpirun -np 1 ./t_mpi1 (-np is for the number of processors)
I should get the following answer:
First MPI program
[t_mpi1]: I am 0 of 1
Success !: First MPI program
meaning I am processor no. "0" of one processor
however, I get
First MPI program
[t_mpi1]: I am 0 of 0 <--- Note the "0" instead of the one.
Success !: First MPI program.
The MPICH indicates that the daemon of rsh must be running such that when
one does :
mpirun -np 4 ./t_mpi1
the virtual machines come into play and I should get:
First MPI program
[t_mpi1]: I am 0 of 4
[t_mpi1]: I am 1 of 4
[t_mpi1]: I am 2 of 4
[t_mpi1]: I am 3 of 4
Success !: First MPI program.
Below you will see the content of several files that you indicated in you
reply.
With the settings in these files, I was able to do a "rsh localhost" but
even with that
the
mpirun -np 4 ./t_mpi1
command gave me the same answer i.e.
First MPI program
[t_mpi1]: I am 0 of 0
Success !: First MPI program.
Also I did as you indicated :
"kill -HUP inetd"
followed by a
"netstat -at"
and a
"tcpdchk -v"
The results of the "netstat -at" gave the following
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:6000 *:* LISTEN
tcp 0 0 *:1024 *:* LISTEN
tcp 0 0 *:920 *:* LISTEN
tcp 0 0 *:919 *:* LISTEN
tcp 0 0 *:smtp *:* LISTEN
tcp 0 0 *:printer *:* LISTEN
tcp 0 0 *:swat *:* LISTEN
tcp 0 0 *:auth *:* LISTEN
tcp 0 0 *:finger *:* LISTEN
tcp 0 0 *:uucp *:* LISTEN
tcp 0 0 *:imap2 *:* LISTEN
tcp 0 0 *:pop3 *:* LISTEN
tcp 0 0 *:pop2 *:* LISTEN
tcp 0 0 *:exec *:* LISTEN
tcp 0 0 *:login *:* LISTEN
tcp 0 0 *:shell *:* LISTEN
tcp 0 0 *:telnet *:* LISTEN
tcp 0 0 *:ftp *:* LISTEN
tcp 0 0 *:time *:* LISTEN
tcp 0 0 *:daytime *:* LISTEN
tcp 0 0 *:discard *:* LISTEN
tcp 0 0 *:sunrpc *:* LISTEN
As you can see "login,shell, telnet and ftp" are listening
The results for "tcpdchk -v" are:
Using network configuration file: /etc/inetd.conf
>>> Rule /etc/hosts.allow line 6:
daemons: in.rshd
clients: localhost rene.renelinux.net
option: allow
access: granted
>>> Rule /etc/hosts.deny line 9:
daemons: swat
clients: ALL EXCEPT 127.0.0.1
access: denied
At this point I do not know what I need to do next. Any help would
be much appreciated.
Regards
Rene
Here is the content of files "/etc/inetd.conf", "/etc/hosts",
"/etc/hosts.allow", "/etc/hosts.deny" and "/etc/hosts.equiv".
I am sorry if this makes the message long.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Content of file "/etc/inetd.conf":
#
# inetd.conf This file describes the services that will be available
# through the INETD TCP/IP super server. To re-configure
# the running INETD process, edit this file, then send the
# INETD process a SIGHUP signal.
#
# Version: @(#)/etc/inetd.conf 3.10 05/27/93
#
# Authors: Original taken from BSD UNIX 4.3/TAHOE.
# Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
#
# Modified for Debian Linux by Ian A. Murdock <imurdock@shell.portal.com>
#
# Modified for RHS Linux by Marc Ewing <marc@redhat.com>
#
# Further modified by Olaf Kirch <okir@caldera.com> for Caldera Open Linux
#
# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
#
# Echo, discard, daytime, and chargen are used primarily for testing.
#
# To re-read this file after changes, just do a 'killall -HUP inetd'
#
# Note: builtin UDP services now silently drop packets from ports < 512.
#echo stream tcp nowait root internal
#echo dgram udp wait root internal
discard stream tcp nowait root internal
discard dgram udp wait root internal
daytime stream tcp nowait root internal
daytime dgram udp wait root internal
#chargen stream tcp nowait root internal
#chargen dgram udp wait root internal
time stream tcp nowait root internal
time dgram udp wait root internal
#
# These are standard services.
#
ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd -l -a
telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd
#
# Mail and news
#
# Do not uncomment either unless you *really* know what you are doing.
# Both are started as standalone daemons from the /etc/rc.d scripts.
#smtp stream tcp nowait root /usr/bin/smtpd smtpd
#nntp stream tcp nowait root /usr/sbin/tcpd in.nntpd
#
# Shell, login, exec and talk are BSD protocols.
#
shell stream tcp nowait root /usr/sbin/tcpd in.rshd
login stream tcp nowait root /usr/sbin/tcpd in.rlogind
exec stream tcp nowait root /usr/sbin/tcpd in.rexecd
talk dgram udp wait nobody.tty /usr/sbin/tcpd in.talkd
ntalk dgram udp wait nobody.tty /usr/sbin/tcpd in.ntalkd
#dtalk stream tcp wait nobody.tty /usr/sbin/tcpd in.dtalkd
#
# Pop and imap mail services et al
#
pop2 stream tcp nowait root /usr/sbin/tcpd ipop2d
pop3 stream tcp nowait root /usr/sbin/tcpd ipop3d
imap stream tcp nowait root /usr/sbin/tcpd imapd
#
# The Internet UUCP service.
#
uucp stream tcp nowait uucp /usr/sbin/tcpd /usr/sbin/uucico -l
#
# Tftp service is provided primarily for booting. Most sites
# run this only on machines acting as "boot servers." Do not uncomment
# this unless you *need* it.
#
#tftp dgram udp wait root /usr/sbin/tcpd in.tftpd
#bootps dgram udp wait root /usr/sbin/tcpd bootpd
#
# This is for the finger service
#
finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd -u
/var/run/.ppp_socket stream unix nowait root /usr/sbin/ppp-envoy
ppp-envoy -da
#
# Finger, systat and netstat give out user information which may be
# valuable to potential "system crackers." Many sites choose to disable
# some or all of these services to improve security.
#
#systat stream tcp nowait nobody /usr/sbin/tcpd /bin/ps -auwwx
#netstat stream tcp nowait nobody /usr/sbin/tcpd /bin/netstat --inet
#
# Authentication
#
auth stream tcp nowait root /usr/sbin/in.identd in.identd
swat stream tcp nowait.400 root /usr/sbin/tcpd swat
#
# End of inetd.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Content of file "/etc/hosts"
# /etc/hosts - hostname_to_address mappings for the resolver library
#
# The format is:
#
# ipaddr fully_qualified_hostname list_of_nicknames
#
# We strongly recommend to use a fully qualified hostname for your machine
# if it is connected to any type of network. You can add short nicknames as
# you like, but the official canonical name is the name that follows the
# IP address and should always be a fully qualified hostname.
#
# If you don't have any network interfaces, you should put your hostname
# in the line of your loopback device, which has the address 127.0.0.1.
#
# LISA or COAS will automatically put the hostname in the right line for
you.
#
#
# !!! Automatically generated by lizard. Do not edit !!!
#
# The loopback device. It should always be available.
#
127.0.0.1 localhost
#
# Your first IP interface (if you are connected to any kind of network)
#
10.162.211.74 rene.renelinux.net .renelinux.net
#
# If you have a nameserver we recommend to use it instead of putting many
# hosts in this file. If you don't have a nameserver though, you can add
# hostnames and their IP addresses below this line.
#
#===========================================================================
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Content of file "/etc/hosts.allow"
#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
in.rshd:localhost,rene.renelinux.net:allow
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Content of file "/etc/hosts.deny"
#
# hosts.deny This file describes the names of the hosts which are
# *not* allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow. In particular
# you should know that NFS uses portmap!
swat:ALL EXCEPT 127.0.0.1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Content of file "/etc/hosts.equiv"
localhost rene
rene.renelinux.net rene
Note: "rene" here is my user name on my Linux machine
"Cameron Kerr" <cameron.kerr@paradise.net.nz> wrote in message
news:401c8594@news.maxnet.co.nz...
> [Followup set to COLN]
>
> In comp.os.linux.networking Rene Girard <aa@bb.yy> wrote:
> > Hi,
> >
> > If I have posted this message on the wrong newsgroup, please let me know
> > which one
> > I should use.
> >
> > I need to have "rshd" (Remore Shell Daemon) running in order to be able
to
> > use
> > MPICH (Message Passing Interface) for parallel computing. I checked the
file
> > "/etc/inetd.conf" and the lines for the BSD protocols are there i.e.
> >
> > shell stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.rshd
> > login stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.rlogind
> >
> > and I also checked to make that the rsh (Remote Shell) software was
> > installed.
>
> Did you HUP inetd? (killall -HUP inetd). After you do that, you can
> verify that something is listening on that port with the command
> "netstat -at", and looking for a LISTENING entry for the ports shell and
> login respectively.
>
> Do you have anything in /etc/hosts.deny and /etc/hosts.allow? You can
> use the tcpdchk program to verify that its a given IP can access a given
> service. The service name you need to use in hosts.{allow,deny} will be
> "in.rshd", or possibly "shell".
>
> You also need appropriate entries in /etc/hosts.equiv for rsh to let
> people in. Here is an example of what you need
>
> csatm4.localeth cameron
> csatm4atm.localatm cameron
> csatm5.localeth cameron
> csatm5atm.localatm cameron
> csatm6.localeth cameron
> csatm6atm.localatm cameron
> csatm7.localeth cameron
> csatm7atm.localatm cameron
> csatm8.localeth cameron
> csatm8atm.localatm cameron
> localhost cameron
> -
>
> You'll need to repeat all the lines above (excppt "-") for every user.
> Or at least, this is what I had to do when I was doing that sort of
> thing. I'd much rather drop rsh completely though and use SSH instead
> (and under Debian Woody at least, if the rsh package isn't installed,
> rsh is set up to be ssh)
>
> > I admit that the above shows my lack of knowledge and understanding of
> > the role of "rshd" and any help in becoming more knowledgeable about
> > this would be much appreciated.
>
> RSH is dangerous and should *ONLY* *EVER* be used in tightly controlled
> situations, and *NEVER* accessable via untrusted networks. Consider the
> use of the Berkeley R-commands to be highly deprecated.
>
> > Additional information:
> >
> > OS: Caldera OpenLinux eDesktop 2.4
> > (Yes, it is old but besides the "rshd" problem, it does the job )
>
> Extremely old, that was the very first distribution I used when I was
> learning Linux all those many years ago, so its over ummm, 6? years old
> by now. I hope for your sake, its not (at least directly) accessable via
> the internet.
>
> --
> Cameron Kerr
> cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/
> Empowered by Perl!
- Next message: Cameron Kerr: "Re: Iptables bridge"
- Previous message: Keith Keller: "Re: How to send a syslog message by E-mail?"
- In reply to: Cameron Kerr: "Re: How to setup RSHD and start it for use with MPICH"
- Next in thread: Cameron Kerr: "Re: How to setup RSHD and start it for use with MPICH"
- Reply: Cameron Kerr: "Re: How to setup RSHD and start it for use with MPICH"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|