rsh fails with -n option

Thread Tools Search this Thread
Operating Systems Solaris rsh fails with -n option
# 1  
Old 07-29-2009
rsh fails with -n option

Issue is with rsh loggin.

I tried logging into solaris machine from solaris machine using rsh with login prompt, it passes.

<Prompt for password> :
USERNAME logged in .......

when i try same command with -n option(required for automation), it fails,
permission denied

".rhosts" file has 0777 permission and contains the correct entry..

Case 1 : Remote machine is Solaris 8 and machine executing rsh command is Solaris 6.

Case 2 : when i use remote machine as Solaris 10 and machine executing rsh command is Solaris 6, it is successfull.

Any ideas why it is failing at Case 1 ?? Basically why -n option is failing and is there any alternate option ??
# 2  
Old 07-29-2009
-n option is to redirect the output to dev/null

rsh -n -l username IPaddr ". ~/.profile >/dev/null 2>/dev/null; YOUR COMMAND HERE"

---------- Post updated at 01:19 PM ---------- Previous update was at 01:17 PM ----------

-n Redirect the input of rsh to /dev/null. You
sometimes need this option to avoid unfor-
tunate interactions between rsh and the
shell which invokes it. For example, if you
are running rsh and invoke a rsh in the
background without redirecting its input
away from the terminal, it blocks even if no
reads are posted by the remote command. The
-n option prevents this.
# 3  
Old 07-30-2009
Even this comman fails,

Reva% rsh -n -l ora1040 ". ~/.profile >/dev/null 2>/dev/null;ls"
permission denied
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Unrecognized option: sparc-sun-Solaris2.10/bin/as: unrecognized option `-m32'

Hi, I installed some packages required by an app built with python. But when I try python install, I get the following error: /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.2.0/../../../../sparc-sun-solaris2.10/bin/as: unrecognized option `-m32' Could anyone tell me what's wrong... (4 Replies)
Discussion started by: Kimkun
4 Replies

2. Linux


Hi All, Whenever we are giving rsh localhost date , it give an error "Permission Denied". RHEL 6 is the version, and we're logging in as "root". in .rhosts file I have mentioned all the details, and enabled rsh,rsync,rexec,rlogin in /etc/xinetd.d/ file Please suggest. Reg, Muzaffar (7 Replies)
Discussion started by: muzaffar.k
7 Replies

3. Shell Programming and Scripting

recently introduced to the newer option for find...does an older option exist?

To find all the files in your home directory that have been edited in some way since the last tar file, use this command: find . -newer backup.tar.gz Is anyone familiar with an older solution? looking to identify files older then 15mins across several directories. thanks, manny (2 Replies)
Discussion started by: mr_manny
2 Replies

4. Shell Programming and Scripting

getopts fails to error on option w/o dash

I have a script with several options and during testing I found that the \? option does not handle options without dashes as I would expect. Then I run the script with any option that does not include a dash, it runs the script when I would expect \? to catch it and error. I've tried this with... (2 Replies)
Discussion started by: HexKnot
2 Replies

5. Solaris


How to enable rsh in solaris (7 Replies)
Discussion started by: durgaprasadr13
7 Replies

6. AIX


How to configure rsh for different users in aix? (4 Replies)
Discussion started by: vjm
4 Replies

7. Shell Programming and Scripting

option followed by : taking next option if argument missing with getopts

Hi all, I am parsing command line options using getopts. The problem is that mandatory argument options following ":" is taking next option as argument if it is not followed by any argument. Below is the script: while getopts :hd:t:s:l:p:f: opt do case "$opt" in -h|-\?)... (2 Replies)
Discussion started by: gurukottur
2 Replies

8. UNIX for Advanced & Expert Users


Hi All, I want to execute a command from my Windows machine to Linux machine using RSH only d:> rsh <Linux machine add> -l <user_name> pwd>dir in linux machine users home directory in .rhosts file I entered the windows machine IP address and user name. In linux etc/hosts.equiv file I... (1 Reply)
Discussion started by: sarwan
1 Replies

9. Shell Programming and Scripting

Help on rsh

Hi, i need to xecute rsh or rexec command in order to execute the script on multiple server. The problem i am facing is when i execute rsh command with login name and hostname it ask me password interactively can some body help me how i can pass password along with the command or how to... (1 Reply)
Discussion started by: deep022in
1 Replies

10. Shell Programming and Scripting

help with rsh

I am trying to run a Perl script using rsh. I need to be able to capture the return code value, so the calling script can handle failures properly. I cannot modify the Perl script I need to run because we use it for all of our servers. Does anyone have a suggestion? (1 Reply)
Discussion started by: kscase
1 Replies
Login or Register to Ask a Question