3

I'm able to remote login the target host with ssh. But when I execute a command through pdsh, it fails with connection refused. Both systems are sles11.

I found a description of the error on this page as follows.

Message:
pdsh@local_hostname: target_hostname:connect: Connection refused

Cause:
The target system is unreachable, or the r services may be disabled for this system.

To Correct:
Check the r services and whether the target system is up and connected.

In my case, the target system is up so the cause should be the disabled r services.
So what are r services and how could I enable it?

migrated from serverfault.com May 22 '13 at 16:53

This question came from our site for system and network administrators.

  • The "r services" are rsh and its friends, who live in /etc/inetd.conf. But I'd advice you to first read the documentation for pdsh to figure out if you can make it connect through ssh; rsh and its friends have pretty much no concept of security. – Jenny D May 22 '13 at 4:39
  • I can't find that /etc/inetd.conf. Is rsh a service? – manuzhang May 22 '13 at 4:59
  • How about doing a web search for "r services unix" or "rsh"? You'll find loads of answers. – Jenny D May 22 '13 at 6:54
3

pdsh uses rsh by default, not ssh. Rsh, rlogin and rcmd are the “r services”; they are deprecated and your system rightly doesn't have them available. Ssh is the modern alternative to the r services; it is preferred because it encrypts and authenticates connections (and also because it's more flexible than the old, quirky r commands). Tell pdsh to use ssh:

pdsh -R ssh …

or set the PDSH_RCMD_TYPE environment variable to ssh:

export PDSH_RCMD_TYPE=ssh
pdsh …
  • indeed, thanks. Also, ssh module is not installed by default so I have to ./configure --with-ssh – manuzhang May 27 '13 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.