Kill remote application launched via SSH command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Kill remote application launched via SSH command
# 1  
Old 08-19-2009
Kill remote application launched via SSH command

Hi All
I launch some application in a remote machine using ssh

EXAMPLE
ssh -X myname@mycompany@RemoteServerIp 'myApplicationName'

When I want to kill the application I hit CTRL+C and I see a message 'Killed by signal 2'.[html][<br>/HTML] Unfortunately on the remote machine the application is not really killed; I can see it still running in the list of process.
How to perfectly killan application launched using ssh? Is CTRL+C not enough?
Thank you very much
# 2  
Old 08-19-2009
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums

*****************************************************

Try sending a kill on the pid via ssh?
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. Shell Programming and Scripting

Ssh remote command and print same line

john-test:/root> ssh -q chicago-ser uname;date Linux Fri Oct 13 16:41:11 GMT 2017 How I can print on the same line like this : Linux Fri Oct 13 16:41:11 GMT 2017 (2 Replies)
Discussion started by: jhonnyrip
2 Replies

3. Shell Programming and Scripting

Remote command in variable using ssh

Hi, I've an issue in a shell script: I'm opening an ssh connection to a remote server, then I want to store the result of a ls command in a variable, but it doesn't work: the ls is done on the local machine. ssh user@server << EOF ls # works as expected (ls is done remotely) test=`ls` # the... (1 Reply)
Discussion started by: seloum57
1 Replies

4. Shell Programming and Scripting

ssh - running remote command not exiting

Hi, i have a shellscript, where in i need to connect to different server start these three jobs and exit from the server and start the same three jobs on local server. ssh user@remotehost 'bash -s' << EOF ${GETT_HOME}/bin/start1 & sleep 10 ${GETT_HOME}/bin/start2 & sleep 10... (1 Reply)
Discussion started by: swapnabhargav
1 Replies

5. Shell Programming and Scripting

Executing remote application using ssh without full reference to its location

Hello again :) , My script has an ssh command to run a script on a remote machine. The script has commands such as sqlplus and unzip. However, the return I get in my own terminal says it can't find sqlplus and unzip. the ssh command is: ssh user@host "cd ScriptDir; ./Script.sh" and the... (6 Replies)
Discussion started by: jangozo
6 Replies

6. Shell Programming and Scripting

ssh to remote command prompt

Hi all, Scenario - trying to run a batch job on a second machine. DIR=directory user=user server=server Here is what i have- ssh user@server 'sleep2; cd $DIR; <jobname>' I have got access to the correct directory, i checked with a pwd command previous. Problem is the job i... (1 Reply)
Discussion started by: Hopper_no1
1 Replies

7. Shell Programming and Scripting

passing arguments in remote ssh command?

i have a bash script on serverA, when i run the script on the server, it runs fine. the way to run the script is like this ./script "option1" Now i am trying to call it from local laptop using ssh command, my command is as the following ssh serverA ~/script "option1" and i got error... (7 Replies)
Discussion started by: fedora
7 Replies

8. UNIX for Dummies Questions & Answers

doubt in ssh command for remote login

Hello sir, Im using ubuntu distro. We all know that ssh is used for password less entry.So, I have the public key and the IP address and the username thats it. Now to login it to the system either I should have password or a private key.Now I have the blacklist of private/public keys. But I dont... (1 Reply)
Discussion started by: nsharath
1 Replies

9. Shell Programming and Scripting

ssh remote command not sourcing bashrc

Hi, WHen I login to the host using ssh, it sources bash_profile then bashrc file, and reads in my path and other variables. But when I want to execute a command remotely, it is not sourcing my bash_profile or bashrc files and I dont get the env I want. THis is causing a lot of problems. HOw... (1 Reply)
Discussion started by: sardare
1 Replies

10. Shell Programming and Scripting

ssh and remote command exec `uname -r`

Hi guys, I am trying to do a ssh for performing a set of actions. Find it below: I need to put the user/ kernel/ DISTRO variables before I complete this operation. what I observed is when ever I put a `command` in those quotes, it performs thta action in local system rather than remote one.... (5 Replies)
Discussion started by: jbmukund
5 Replies
Login or Register to Ask a Question