# passwordless rsh and rlogin

**URL:** <https://forums.suse.com/t/passwordless-rsh-and-rlogin/25002>\
**Category:** SLES Configure-Administer\
**Created:** [January 20, 2014, 11:18am UTC](https://forums.suse.com/t/passwordless-rsh-and-rlogin/25002 "2014-01-20T11:18:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephenisthebaker](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@stephenisthebaker](https://forums.suse.com/u/stephenisthebaker)\
**Post date:** [January 20, 2014, 11:18am UTC](https://forums.suse.com/t/passwordless-rsh-and-rlogin/25002/1 "2014-01-20T11:18:19Z")

</div>

Hello,

I am having trouble configuring passwordless rsh and rlogin on SLES 11 sp2.

by passwordless, I mean, I use:

```auto
rsh -l root testhost1
```

and without asking for a password the connection is made and authenticated.

Before I continue I want to set the record straight: I understand the security risks and implecations involved with such a passwordless configuration. I am working in a physically segregated environment with NO physical or wireless connection to the internet or any other part of the outside world. The environment is a research environment and is meant to allow for testing. The developers require passwordless rsh and rlogin as well as ssh, telnet, rsync, and other ways of connecting for the tests that they run. I cannot convince the developers to use a different method, as they are doing research that requires connecting with these different methods as part of the testing and research data they are collecting.

Now that is out of the way, so let me continue.

/etc/xinetd.d/rsh

[code]# /etc/xinetd.d/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  
}[/code]

/etc/xinetd.d/rlogin

[code]# /etc/xinetd.d/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  
{  
disable = no  
socket\_type = stream  
wait = no  
user = root  
log\_on\_success += USERID  
log\_on\_failure += USERID  
server = /usr/sbin/in.rlogind  
}[/code]

/etc/pam.d/rsh

[code]# /etc/pam.d/rsh  
#%PAM-1.0

# For root login to succeed here with pam\_securetty, “rsh” must be

# listed in /etc/securetty.

auth required pam\_nologin.so  
auth required pam\_securetty.so  
auth required pam\_env.so  
auth sufficient pam\_rhosts.so  
account include password-auth  
session optional pam\_keyinit.so force revoke  
session required pam\_loginuid.so  
session include password-auth[/code]

/etc/pam.d/rlogin

[code]# /etc/pam.d/rlogin  
#%PAM-1.0

# For root login to succeed here with pam\_securetty, “rlogin” must be

# listed in /etc/securetty.

auth required pam\_nologin.so  
auth required pam\_securetty.so  
auth required pam\_env.so  
auth sufficient pam\_rhosts.so  
auth include password-auth  
account include password-auth  
password include password-auth  
session optional pam\_keyinit.so force revoke  
session required pam\_loginuid.so  
session include password-auth[/code]

/etc/hosts.equiv

[code]# 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

- +[/code]

/etc/securetty.bak

[code]#

# This file contains the device names of tty lines (one per line,

# without leading /dev/) on which root is allowed to login.

# 

tty1  
tty2  
tty3  
tty4  
tty5  
tty6[/code]

The above is the information I have in the relevent files.

I do not have a /etc/securetty file, but I do have a /etc/securetty.bak file which I also included above.

When I try to connect I use:

```auto
rsh -l root testhost1
```

and it still asks me for a password.

At this point I am completely stuck. I very much appreciate any assistance with this that can be provided.

Thanks!

-S

---

<div class="post-metadata">

**Author:** ![mikewillis](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mikewillis](https://forums.suse.com/u/mikewillis)\
**Post date:** [January 20, 2014, 6:11pm UTC](https://forums.suse.com/t/passwordless-rsh-and-rlogin/25002/2 "2014-01-20T18:11:51Z")

</div>

[QUOTE=stephenisthebaker;18713]  
I do not have a /etc/securetty file, but I do have a /etc/securetty.bak file which I also included above.  
[/QUOTE]

I’d try recreating /etc/securetty from /etc/securetty.bak.

/etc/securetty is provided by the pam package

[CODE]:~ # rpm -qf /etc/securetty  
pam-1.1.5-0.10.17  
:~ # cat /etc/securetty

# 

# This file contains the device names of tty lines (one per line,

# without leading /dev/) on which root is allowed to login.

# 

tty1  
tty2  
tty3  
tty4  
tty5  
tty6  
[/CODE]  
so that you don’t have one suggests it’s been deleted at some point.
