Script to run Klocwork from Machine 1 to machine 2


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script to run Klocwork from Machine 1 to machine 2
# 1  
Old 08-29-2012
Question Script to run Klocwork from Machine 1 to machine 2

I use Ubuntu 10.04 in 2 virtual machines. In one machine I have installed Hudson and another machine is to run klocwork. Scenario is when I trigger a build in Hudson, the script has to run successful and call the Klocwork in VM2. In the build script I have given the following command to call Klocwork in machine 2. Below is the script I use to call machine 2 from machine 1.
Code:
if [ $Klocwork = "true" ]; 
then 
   echo "Starting Klocwork Report ..." sshpass -p 'password' ssh IP-address "sudo chmod 755 /localpath/build_script_kw.sh;
   /local path/build_script_kw.sh $SVNID $Version" fi 
echo "Build Successfully."

when I run the script, I get Host key verification failed error. Please provide me a solution for this issue.

Please let me know, if there is any modification to be done in the script.

Thanks,
Sreeram B

Last edited by vbe; 08-29-2012 at 12:46 PM.. Reason: code tags
# 2  
Old 08-29-2012
Quote:
Originally Posted by bsreeram
I use Ubuntu 10.04 in 2 virtual machines. In one machine I have installed Hudson and another machine is to run klocwork. Scenario is when I trigger a build in Hudson, the script has to run successful and call the Klocwork in VM2. In the build script I have given the following command to call Klocwork in machine 2. Below is the script I use to call machine 2 from machine 1.
if [ $Klocwork = "true" ]; then echo "Starting Klocwork Report ..." sshpass -p 'password' ssh IP-address "sudo chmod 755 /local path/build_script_kw.sh;/local path/build_script_kw.sh $SVNID $Version" fi echo "Build Successfully."when I run the script, I get Host key verification failed error. Please provide me a solution for this issue.

Please let me know, if there is any modification to be done in the script.

Thanks,
Sreeram B
Host key verification is probably just telling you that the hostname you're hitting showed a different key in the past. SSH manually and the error should probably pop up, then just delete the offending line from known_hosts in your ssh folder (Normally ~/.ssh/).
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Unable to run the script on remote machine Using Expect script

Not able to execute the file in remote host using except utility I am automating the SFTP keys setp process: So i created the expect script for controlling the output of shell below is my main code: Code: #!/usr/bin/expect set fd set password close $fd set df set app close $df... (1 Reply)
Discussion started by: Manoj Bajpai
1 Replies

2. Shell Programming and Scripting

Run shell script on different machine using perl script

I want to execute my shell script on remote machine using SSH in perl script. Please help me with syntax. (2 Replies)
Discussion started by: james1988
2 Replies

3. UNIX for Dummies Questions & Answers

how to use ssh to run shell script on a remote machine?

how to use ssh to run shell script on a remote machine? ssh user@remote sh ./script.unx i ran the above command ./script.unx HAS NOHUP COMMAND IN ITS BODY, I AM GETTING ERROR AS NOHUP NOT FOUND... i tried to run that script from remote server, its working fine do ineed to set... (6 Replies)
Discussion started by: only4satish
6 Replies

4. Shell Programming and Scripting

How to transfer files from unix machine to local machine using shell script?

Hi All.. Am new to Unix!! Am creating a shell script in which a scenario is like i have transfer the output file from unix machine (Server) to local directory (Windows xp). And also i have to transfer the input file from the local directory to Unix machine (Server) Any help from you... (1 Reply)
Discussion started by: vidhyaS
1 Replies

5. Shell Programming and Scripting

shell script to copy files frm a linux machine to a windows machine using SCP

I need a shell script to copy files frm a linux machine to a windows machine using SCP. The files keeps changing day-to-day. I have to copy the latest file to the windows machine frm the linux machine. for example :In Linux, On July 20, the file name will be 20.txt and it should be copied to... (3 Replies)
Discussion started by: nithin6034
3 Replies

6. Shell Programming and Scripting

shell script to run after ssh logout from another machine

Scenario: I currently manager a cluster at work which is on a private network and i constantly need to ssh to other clients for diags e.t.c. I created a debain client which i use as my gateway to get to all the clients on the private network and I then created a Shell menu script which will make... (4 Replies)
Discussion started by: defamer
4 Replies

7. Shell Programming and Scripting

How to run perl script in remote machine from java application?

Hi I am working in a java application. I need to execute a perl script(linux) which is in remote machine in java application from local machine(windows). I need to do this process automatically that is without manual intereption. Now I will explain the process clearly, at present to run the... (1 Reply)
Discussion started by: bassma
1 Replies

8. Shell Programming and Scripting

Run KSH script in Windows machine

Hi i created a unix script ksh that goes to a specific folder/xyz/abc, searches for all the .txt files in it and perform some operation on these text file. It runs well in Unix server(machine) Now this script needs to be run on a windows machine having the same folder structure(that is look... (1 Reply)
Discussion started by: mad_man12
1 Replies

9. Red Hat

To find the LATEST file from a dir on REMOTE machine and SCP to local machine?

Hi All, URGENT - Please help me form a scipt for this: I need the LATEST file from a dir on REMOTE machine to be SCP'd to a dir on local machine. (and I need to execute this from local server) I know that the below cmd is used to find the LATEST file from a dir. But this command is not... (3 Replies)
Discussion started by: me_ub
3 Replies

10. Shell Programming and Scripting

How to execute a script hosted on a machine from a different machine

Hi everyone I intend to trigger a script from one machine say mc1 that actually excutes on different machine say mc2 and redirect the logs to that machine mc2. I tried to use nohup <nfs location of machine >/script.sh > <nfs location of machine >/script.log 2>&1 & nfs location of... (2 Replies)
Discussion started by: harneetmakol
2 Replies
Login or Register to Ask a Question