Configure rsh so that is does not prompt for a password

Both rsh or rlogin prompt for a password. All you need to do is open /etc/hosts.equiv file on host system and add entries for all hosts you would like use without password .

ADVERTISEMENTS

This file list of hosts and users that are granted “trusted” r (rsh/rloging) command access to your system without supplying a password.

$ cat /etc/hosts.equiv

Output:

job1.ha1.nixcraft.com
job2.ha1.nixcraft.com
job3.ha1.nixcraft.com

In above file job1, job2, job3 hosts can connect without a password.

Caution: R (rsh/rlogin) commands are very insecure if possible switch to secure shell (ssh). You can configure ssh so that is does not prompt for a password.

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
4 comments… add one
  • Diabolic Preacher Mar 14, 2009 @ 5:24

    hello Vivek,
    Could you please tell how do I turn on RSH on ubuntu, if its turned off. Need it temporarily.

  • art Nov 17, 2011 @ 23:01

    doesnt work

    rsh xxx
    Password:

  • sbaker Jan 20, 2014 @ 7:13

    Hello, and thank you much for the article!

    However as the other commenters have said, This doesn’t seem to work, or at least for me it does not work in SLES 11 sp2.

    i have checked /etc/pam.d/rsh (and rlogin) and that file does NOT list pam_rhosts_auth.so, however it does have pam_rhosts.so, which I set to sufficient per several other articles.

    I cannot determine how to install pam_rhosts_auth.so, otherwise I would have tried that.

    Any assistance would be highly appreciated!

    Thanks!

    -Stephen

  • ~Hasan Jan 30, 2015 @ 12:09

    Hey, it work for me
    Thanks

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.