Closing ssh when process run on remote


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Closing ssh when process run on remote
# 1  
Old 09-03-2008
Closing ssh when process run on remote

Hi!

I currently run a very long script (two hour left...) on a remote computer through a ssh session. I wonder whats happend if I close the ssh session, or even, the terminal. Is the script running on remote will stop?

Thanks for your answers,

Tp
# 2  
Old 09-03-2008
I depends on what your script does with a HUP signal. If you havn't specifically added signal traps, I'd say that closing the ssh session would kill the script at the other end.

If you want to prevent this in the future, you can start your script using 'nohup script.sh' to protect it from those signals.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Ssh to multiple hosts and then run multiple for loops under remote session

Hello, I am trying to login to multiple servers and i have to run multiple loops to gather some details..Could you please help me out. I am specifically facing issues while running for loops. I have to run multiple for loops in else condition. but the below code is giving errors in for... (2 Replies)
Discussion started by: mohit_vardhani
2 Replies

2. Ubuntu

Run a script at remote server without ssh password

Hello, What I want to do is to run a file on remote server by running a script at localhost but script should not ask ssh password of my remote server when script is executed. Scenario1: To copy files from server2 to data server:$ scp -r root@server2_ip:/var/www/html/*.* /var/ When I enter... (6 Replies)
Discussion started by: baris35
6 Replies

3. Shell Programming and Scripting

How to run commands on remote server using ssh password less authentication?

Hi, I need to run a script located in a directory on remote server by using ssh authentication from my local unix server. Can anyone help me in this. I have tried the below command. It worked for echo command but when i tried to open a file using cat command it is showing "cat: cannot open... (6 Replies)
Discussion started by: ssk250
6 Replies

4. UNIX for Dummies Questions & Answers

PAM closing SSH session

Hello guys, You are my last hope. I googled for hours and tried so many things but I can't find a way to fix my problem. So there we go: I open a SSH tunnel to my linux vps. My client sends every 5-minutes a keepalive package and I also set the "ClientAliveInterval" value to 300 in the... (8 Replies)
Discussion started by: iamanewb
8 Replies

5. 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

6. Shell Programming and Scripting

SSH Remote login to VIO's (padmin) and run oem_setup_env

Hello all, I have been trying to run commands that collect basic info from the VIO's The issue I am having is setting the env with the "oem_setup_env" after I login as "padmin". I usually do the following: ssh server command ssh root@server date , but I need to login set the env and... (0 Replies)
Discussion started by: dfezz1
0 Replies

7. Shell Programming and Scripting

Ability to run sas prog on remote server using SSH

Hi, I am trying to run a sas prog on a remote server using ssh. I have got the command that I am using in the below paragraph. With it, I was able to run shell scripts but when I tried 'sas' it errored out. I have got my keys exchanged so when I say ssh serverA I automatically connect to my... (4 Replies)
Discussion started by: coolavi
4 Replies

8. Solaris

closing of ssh section through script

Hi we have a script which establish connection to two other UNIX server through ssh for transfering files There was no exit command after each ssh connection the script ends with done whether this will close all the ssh connection established throgh script which running under cron... (4 Replies)
Discussion started by: GIC1986
4 Replies

9. UNIX for Advanced & Expert Users

how to run a process after closing the terminal

i want to execute a shell script even if the terminal is closed. how to do? (3 Replies)
Discussion started by: lakshmananindia
3 Replies

10. Shell Programming and Scripting

Issues using ssh from crontab to run remote script from

I have a solaris9 x86 server using ssh as follows: SSH Version Sun_SSH_1.0, protocol versions 1.5/2.0. The remote server solaris9 sparc has exactly the same version ssh installed. I am running a script on my server which includes the following command to run a script on the remote server:... (4 Replies)
Discussion started by: frustrated1
4 Replies
Login or Register to Ask a Question