command not working with rsh(remote shell)


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting command not working with rsh(remote shell)
# 1  
Old 02-12-2007
command not working with rsh(remote shell)

Hi,

root@air01a>SS7Manager -status

This command gives correct output. But when I write this in script and run it on SUNMC (which can connect to air01 and by default login as root). It gives the error "SS7manager not found" or "can not open". Here is the scripts.

#!/bin/sh
rsh air01a SS7Manager -status >> air_log.txt


For your refrence if I run below script. It gives correct output without any problem.

#!/bin/sh
rsh air01a df -h >> air_check.txt
rsh air01a sar 1 5 >> air_check.txt


Kindly Help!!!
# 2  
Old 02-12-2007
The path to the SS7Manager command may not be getting set when logging in using rsh. Try using the absolute path to the command when you rsh.
# 3  
Old 02-12-2007
How can we check the path of a command? Because this SS7Manager is proprietary utility.
# 4  
Old 02-12-2007
Quote:
Originally Posted by lastkey
How can we check the path of a command? Because this SS7Manager is proprietary utility.
When logged in on host "air01a" you can try:
which SS7Manager

Also you could try:
ps -ef | grep SS7Manager (because I assume it is running, and "ps" might tell you the full path)

If meither doesn't tell you the location you can try:
find / -name SS7Manager
# 5  
Old 02-12-2007
Thank you brother. Problem solved by giving full path of SS7Manager. But I used

'#type SS7Manager', to get the full path of command. Thanks a lot for your help.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute ssh command with additional terminal command to any remote user not working script

Hello i am having an issue with bash script and this is the code now=$(cat hosts1.txt | awk '{print $2;}') while read n ;do ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers' When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies

2. Solaris

rsh is not working

i am using solaris 8. i can access my server through telnet. but not able to access rsh or rlogin. i can rsh from this server to another machine but not from other machine to this machine. How to start rsh service. i have restarted inetd. pkill -HUP inetd. thanks (1 Reply)
Discussion started by: sunnybee
1 Replies

3. Shell Programming and Scripting

Passing shell variables to a rsh command

I noticed my script is not passing the value of variable alert to the rsh command. I need some assistance, please. This is a solaris environement. Thanks! :confused: #!/bin/sh echo -n "Alert number:" read alert rsh rhost_name 'egrep $alert /opt/var/log/*.logs' (2 Replies)
Discussion started by: lopus
2 Replies

4. AIX

rsh not working

Hi, I am getting the below error while using rsh from other logins in AIX 5.3 rcmd2: socket: The file access permissions do not allow the specified action. whereas the same is working fine with root login. I have already defined the host entries in etc/hosts as well as in .rhosts... (0 Replies)
Discussion started by: viplov
0 Replies

5. Shell Programming and Scripting

Cut command on a remote machine using rsh

Hi all, I have a file on a remote machine and I want to do a cut operation on that file. So, I have been doing rsh <remote> " cut -d " " -f 2 <filename> " cut: invalid delimiter But, when I get the file to the local machine and run the same command, I get... (1 Reply)
Discussion started by: eamani_sun
1 Replies

6. Shell Programming and Scripting

Script using rsh(remote shell)

Hi, I am writing a script that will require me to perform tasks across servers. I tried to use rsh <host> "Commands..." > /dev/null 2>&1. However, I am required to execute a long series of commands after that and rsh does not seem to support this and its also insecure. I tried to use rsh to... (5 Replies)
Discussion started by: joseph_ng
5 Replies

7. AIX

RSH not working

Hi all I have updated my .rhosts file as per the norm, however for some reason on hostA I cannot rsh to hostB. The entries on /.rhosts on hostA are as follows :- hostB + hostB on the other can do rsh without a problem. Any ideas ? :confused: (1 Reply)
Discussion started by: jhansrod
1 Replies

8. UNIX for Dummies Questions & Answers

rsh not working

Dear all; I have to Unix servers SUM1 and SUM2 running Reliant Unix 5.45 on both servers i have a system user called "netop". i want netop on SUM1 to execute rsh from SUM1 to SUM2. What i did, i put in the .rhosts file in the home directory of netop on SUM2 the following entry: netop ... (2 Replies)
Discussion started by: bcheaib
2 Replies

9. UNIX for Dummies Questions & Answers

RSH - Remote Shell

Dear All, I was wondering if there was any way that I could make RSH be non-blocking? i.e. make a remote connection to another machine and execute a function while being able to resume your program. T (4 Replies)
Discussion started by: thoang
4 Replies

10. Shell Programming and Scripting

rsh help with remote prompts

Hi, I'm writing a shell script that rsh's onto a remote machine and runs a perl script that requires values to be entered as the script executes. I also need to ba able to see the outputs from the perl script. When I try to run it I get an stty : Invalid argument and understand that this is... (4 Replies)
Discussion started by: ianf
4 Replies
Login or Register to Ask a Question