What is wrong with the rsh?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting What is wrong with the rsh?
# 1  
Old 10-19-2008
What is wrong with the rsh?

using rsh
i try to run the following command:
rsh -l user_of_the_host host_ip_address "mysql -uroot"
(the mysql has been installed on the target host
under the path :/usr/local/mysql)
but get the error prompt :
-bash:command not found mysql
# 2  
Old 10-19-2008
Two different versions of unix created rsh at about the same time, but they are very different.
BSD rsh is remote shell
USG rsh is restricted shell

Modern OS's try to support both of these and you probably have the wrong one. Use remsh instead. It should always be the BSD rsh.

And I guess I need to add the traditional remsh lecture... remsh has terrible security and you should switch to ssh. yada yada yada
# 3  
Old 10-19-2008
The other problem is the PATH. rsh does not use the remote user's .profile (or .bash_profile). If you know the full path to mysql, use it. Even then, there may be a library problem if it's not installed in the default path. In that case, you can do something like:

Code:
rsh -l user  env LD_LIBRARY_PATH=...  PATH=.... mysql  ....

Where ... is what you fill in.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Why result is wrong here ? whether break statement is wrong ?

Hi ! all I am just trying to check range in my datafile pls tell me why its resulting wrong admin@IEEE:~/Desktop$ cat test.txt 0 28.4 5 28.4 10 28.4 15 28.5 20 28.5 25 28.6 30 28.6 35 28.7 40 28.7 45 28.7 50 28.8 55 28.8 60 28.8 65 28.1... (2 Replies)
Discussion started by: Akshay Hegde
2 Replies

2. Linux

RSH

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. Red Hat

Rsh

Hi, I issue : rsh ****.16.0.151 -l root ls -l /tmp and I receive : connect to address ***.16.0.151: Connection refused Trying krb4 rsh... In hosts file of remote (***.16.0.151) I have : ***.16.0.202 root Can you help me ? Thank you. (0 Replies)
Discussion started by: big123456
0 Replies

4. Solaris

rsh

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

5. AIX

Rsh

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

6. UNIX for Advanced & Expert Users

Rsh

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

7. Linux

Help in RSH

Hi All, I want to execute a command from my Windows machine to Linux machine. 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 entered the... (1 Reply)
Discussion started by: sarwan
1 Replies

8. UNIX for Dummies Questions & Answers

help on rsh

hi friends, i've access to three machines mc1,mc2,mc3,on which i can log in as root. and in order to run a simple command on a remote machine(say remote) on which i cant log in,i use a command as; # rsh remote ls the above runs properly but if i do an ls on following it doesnt work # rsh mc2... (1 Reply)
Discussion started by: mxms755
1 Replies

9. UNIX for Advanced & Expert Users

where is rsh

Hi, when a user use rsh command (or any other) , where is the executable used by him ? Many thanks in advance. (1 Reply)
Discussion started by: big123456
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