rsh connection using embedded command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting rsh connection using embedded command
# 1  
Old 01-30-2011
Tools rsh connection using embedded command

Hello,

I am doing an rsh connection to server2.
I want to perform several command on server2.

I.E:
i=1
rsh server1 -l username "z=$i;`script.ksh`"

(1)Is this the right way to give z value to be used on server2?
(2) Is this the right way to run a script on server2?
# 2  
Old 01-31-2011
Well, you say server 2 and go to 1, you need to export z if it is going to a called script, and backquotes produce a string value from stdout that, in this case, will be executed, which seems bizarre.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[Solved] Rsh does not close connection on exit

Dear all, We have a service that we start up remotely with rsh but unfortunately, the rsh never returns to the calling server. This seems to be because the processes of the service we've just started hold the port open.RBATTE1 @ /home/RBATTE1>netstat -na|grep 49.51 tcp4 0 0 ... (1 Reply)
Discussion started by: rbatte1
1 Replies

2. Shell Programming and Scripting

RSH connection problem while running MPI program

I'm trying to run MPI programs on 8 machines, but I get the error connect to address 127.0.0.1 port 544: Connection refused Trying krb4 rsh... connect to address 127.0.0.1 port 544: Connection refused trying normal rsh (/usr/bin/rsh) lagrid02: Connection refused When I run it with a... (8 Replies)
Discussion started by: vishwamitra
8 Replies

3. Shell Programming and Scripting

Replace last line of file in memory via embedded command?

Further to my earlier question regarding embedded commands I now want to delete then replace the last line in a file in memory.... FILEHERE=$((echo "$FILEHERE" | sed -e '$d' ) echo "this now added") this is throwing a syntax error but as I'm still getting used to this structure I... (1 Reply)
Discussion started by: Bashingaway
1 Replies

4. AIX

RSH command is giving error (connection refused)

All, I am using AIX 5.3. while running the rsh command I am getting below error message. ------------------ A remote host refused an attempted connect operation. ------------------ .rhost file is updated with correct entry on both the servers. I.e. Login ID Server name in /etc/hosts... (12 Replies)
Discussion started by: anshu ranjan
12 Replies

5. Shell Programming and Scripting

Problem with embedded FTP command in Ksh - System Cannot find the specified path.

I have the following FTP embedded in a Ksh script on AIX 5.3 ftp -n <<WHATEVER open 10.101.26.218 user hcistats ******* ascii put $thupdatefile put $thcollectfile quit WHATEVER Here is what my script returns: ... (3 Replies)
Discussion started by: troym72
3 Replies

6. UNIX for Dummies Questions & Answers

vxWorks connection to solaris 9.0 rsh vs ftp problem

Can anyone point me in the right direction.. I have a test system which requires vxWorks to be loaded via TCPIP I am using a Sun ultra10 box with Sol 9.0 installed as the server I have configured the server and am able to load the boot image without any problems. I assume it is using the... (0 Replies)
Discussion started by: shortsrkt
0 Replies

7. Solaris

rsh is not working ,error :connection refused

rsh is not working command:rsh targethost -l username command Error:Connection refused I checked on the server rshd was not working. Tried to start by /usr/sbin/in.rshd start # ./in.rshd start rshd: getpeername: Socket operation on non-socket Please help (1 Reply)
Discussion started by: aneita
1 Replies

8. Shell Programming and Scripting

rsh connection problem

I am trying to connect to a remote server using rsh. first i have given the following command. $ rsh 242.13.45.54 -l now i got the following message "connect to address 242.13.45.54: Connection refused Trying krb4 rlogin... connect to address 242.13.45.54: Connection refused trying... (1 Reply)
Discussion started by: ravi raj kumar
1 Replies

9. Solaris

rsh connection is very slow.....what to look for...???

Hi All, My rsh connecion is very slow, what should I look for...??? Note : I get the rsh connection, but it takes time. Thanks & Regards, jumadhiya. (3 Replies)
Discussion started by: jumadhiya
3 Replies

10. Shell Programming and Scripting

rsh problem connection refused

I'm trying to use rsh command to read a variable on a remote machine. I can rlogin with no problem. If I rsh HOST I also get connection like with rlogin. There is no need for passwords. But when I rsh HOST COMMAND it waits 30 seconds then gives me a connection refused error message. Any ideas? ... (4 Replies)
Discussion started by: Mace
4 Replies
Login or Register to Ask a Question