Executing remotely the script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Executing remotely the script
# 8  
Old 02-21-2007
rcp is remote copy. I think you could be getting this for 2 reasons.

A. Either you have 2 different login id's on these 2 machines.

B. The password for login id you are using on the server that you are executing the script has changed.

Let me know if you need more help.
# 9  
Old 02-21-2007
THank you for your reply

I think none of two aletrnatives is the cause of this. Because yesterday it worked and the errror occured just today. No password changed.
# 10  
Old 02-21-2007
Hmm ok one more thing to check out in that case

Verify if your .rhosts file in the remote server is configured properly i.e. to allow root access from your local host.

Check $HOME/.rhosts file

It should have permissioning as follows:

<machine name where remsh is getting executed> root

After checking above entries in .rhosts you can check the trust between the servers using..

#rlogin <servername> -l root

If you are able to logged in without prompting for password then you are done !!!

If the password is prompted then, remsh command also wont work.

Also if you have root access one thing might be that the passwords for root differ between the two machines.

Just spitting out different guesses here.

Hopefully this helps

Let me know
# 11  
Old 02-21-2007
What about rsh ?? Can't i run a command/script in remote machine useing rsh ?

Examle-
rsh REOTE_MACHINE_NAME -n "chmod 664 SOME_FILE"
# 12  
Old 02-21-2007
rsh or remsh is the same thing. Regardless of what you use if your remote host file (.rhost) files are not correct you won't be able connect between two different hosts.
# 13  
Old 02-21-2007
I cannot undersand why remsh works properly and rcp (for turning back the value) doesnt work. I think the configuration for both this commands is the same, if it works for remsh should work for the other one too.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run yes/no script remotely

I have this script in server2 # cat /root/yesno.sh #!/bin/bash read -p "are you sure?" -n 1 -r if $ ]]; then echo "" echo "YES" else echo "NO" fi # sh /root/yesno.sh are you sure?y YES (5 Replies)
Discussion started by: anil510
5 Replies

2. Shell Programming and Scripting

[perl] execute remotely script

Hello Can some help with write part of perl script I need something like this in perl SSH="/bin/ssh -o BatchMode=yes -o" USER="test" SRV="server" SCRIPT_TO_EXEC="/tmp/test.sh" -> shell script OUT=/tmp/out.file ${SSH} -l ${USER} ${SRV} 'sudo /usr/bin/ksh -s' < ${SCRIPT_TO_EXEC} >> ${OUT}... (1 Reply)
Discussion started by: vikus
1 Replies

3. Shell Programming and Scripting

Remotely Executing Shell Script - Problems

Hey Lads, I have a shell script on a remote Server X that i need to execute from Server A. the script executes fine locally but remotely does not. It appears the script on the remote machine is calling another shell script which only has an array defined . Please see below the errors. ... (10 Replies)
Discussion started by: Irishboy24
10 Replies

4. Shell Programming and Scripting

Then error while running script remotely

facing issue with then error while running a local script aginst a remote server. i facing the same issue in multiple scripts. So what i am missing here or what is needed. #!/bin/ksh echo "enter the filename" read file if then echo "file exists" else echo "file does not exists" fi ... (0 Replies)
Discussion started by: NarayanaPrakash
0 Replies

5. Shell Programming and Scripting

Problems with remotely executing scripts

Hi, in the below command, i export a value to a variable which later is used by the script, however i dont see the exported value is actually been exported. ssh user@host "export var=/path/ ; cd /path/ ; ./script" how can i use the above command with proper value of var remotley (7 Replies)
Discussion started by: suraj.sheikh
7 Replies

6. Shell Programming and Scripting

Remotely Execute a script

Hi, What is the best way to remotely execute a script? Scenario: 1 Unix box creates a file and moves it to a 2nd unix box 2nd unix box must then move the file to a windows server How can i execute the ftp script on the 2nd server, I need to schedule the command to automate it!? I... (3 Replies)
Discussion started by: mcclunyboy
3 Replies

7. UNIX for Advanced & Expert Users

script to remotely start an application instance

just wanted to ask if anybody have script template for the subject above so I can make ti as my guide? example a. server 1.1.1.1: restart script located at /etc/init.d/glassfish.sh b. server 2.2.2.2: central script that support admin will use to execute to restart the /etc/init.d/glassfish.sh... (0 Replies)
Discussion started by: lhareigh890
0 Replies

8. Shell Programming and Scripting

remotely call function from local script

The following code doesn't work properly which means it doesn't displays remote output. #!/bin/ksh #################### Function macAddressFinder ######################## macAddressFinder() { `ifconfig -a > ipInterfaces` `cat ipInterfaces` }... (2 Replies)
Discussion started by: presul
2 Replies

9. IP Networking

Script for Changing an IP address remotely

Hi Fellows, I am a beginner in shell scripting struggling with a script. I have to write a script to change the IP address of computer remotely running on solaris or Linux ,which is to be added to a cluster.I am working on unix. Presently the administrator runs a sanity check script on the... (3 Replies)
Discussion started by: pranav.mehta3
3 Replies

10. Shell Programming and Scripting

Remotely executing awk command

ssh user@machine awk '{ split ($1,ar,"!");print ar}' samp >samp1 Error: Unmatched '. However on <machine> awk '{ split ($1,ar,"!");print ar}' samp >samp1 executes successfully. Any suggestions. (1 Reply)
Discussion started by: bishweshwar
1 Replies
Login or Register to Ask a Question