Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i have configured rsh but it show permission denied, below are the configuration details.
[root@mindnic-06 ~]# cat /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
{
socket_type = stream
wait = no
user = root
log_on_success += USERID
log_on_failure += USERID
server = /usr/sbin/in.rshd
disable = no
}
[root@mindnic-06 ~]#
[root@mindnic-06 ~]# cat /etc/securetty
console
rsh
rlogin
vc/1
vc/2
vc/3
vc/4
vc/5
vc/6
vc/7
vc/8
vc/9
vc/10
vc/11
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
rsync
rexec
[root@mindnic-06 ~]# cat /etc/hosts.equiv
+ +
[root@mindnic-06 ~]# cat /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 required pam_rhosts.so
account include password-auth
session optional pam_keyinit.so force revoke
session required pam_loginuid.so
session include password-auth
[root@mindnic-06 ~]# /etc/init.d/xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@mindnic-06 ~]# rsh localhost date
Permission denied.
[root@mindnic-06 ~]#
thanks for the reply, i agree with you. I am working in storage domain where we have to run the Automation and Manual Test Cases. so in Automation scipts we use rsh tool to remotely login to devices say client where it will login without password. we cant use ssh here, ssh cant login without password so i was in need of that, I was able to solve this issue, we have to disable all firewall and selinux related things and reboot the machine once
[root@mindnic-06 ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disable
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@mindnic-06 ~]# rsh localhost date
Wed Nov 28 10:48:39 IST 2012
[root@mindnic-06 ~]#
Last edited by muzaffar_muzu; 11-27-2012 at 11:37 PM.
1. Ensure that rsh and rsh_server are installed (rpm –qa | grep rsh*). If they aren’t install them (make sure xinetd is installed as well)
2. After installing the rsh packages modify the /etc/xinetd.d/rsh file. Change Disabled = yes to Disabled = no
3. Modify the line in the /etc/pam.d/rsh so that it reads as follows:
required pam_rhosts_auth.so promiscuous
4. Add rsh to /etc/securetty
5. Also create or add the allowed hostnames to the ~/.rhosts file to add them to the list of allowed rsh hosts.
I added + + to my .rhosts and all works great from any host. I've run into problems when specifying a specific hostname so the plus space plus works best.
6. run the command service xinetd start
7 If running CentOS7 you have to run these commands
systemctl start rsh.socket
systemctl start rexec.socket
systemctl start rlogin.socket
systemctl enable rsh.socket
systemctl enable rexec.socket
systemctl enable rlogin.socket
Hope this helps. Works for me since I use pdsh all the time for managing my cluster.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.