How keep running a program n an another computer via a connection ssh when the connection is closed? | Unix Linux Forums | UNIX for Advanced & Expert Users

  Unix/Linux Go Back    


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

How keep running a program n an another computer via a connection ssh when the connection is closed?

UNIX for Advanced & Expert Users


Tags
connection, program, running, stop

Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 02-15-2013
TomTomGre TomTomGre is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 15 February 2013, 7:41 AM EST
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
How keep running a program n an another computer via a connection ssh when the connection is closed?

Hi everybody,

I am running a program on a supercomputer via my personal computer through a ssh connection. My program take more than a day to run, so when I left work with my PC I stop the connection with the supercomputer and the program stop.

I am wondering if someone know how I can manage to keep my program running on the supercomputer even if the connection with my computer is closed?

Thancks in advance!
Cheers Thomas
Sponsored Links
    #2  
Old Unix and Linux 02-15-2013
cero cero is offline
Registered User
 
Join Date: Aug 2006
Last Activity: 26 March 2015, 12:26 PM EDT
Posts: 399
Thanks: 4
Thanked 79 Times in 71 Posts
Hi,
start your program in the background and protect it from the HUP-signal, which causes it to stop when you close your connection to the remote machine.

Code:
nohup /path/to/your/program &

This will of course only work for non-interactive programs.
Edit: in case your program needs human interaction have a look if the tool screen is installed on the remote machine.
Sponsored Links
    #3  
Old Unix and Linux 02-15-2013
MadeInGermany MadeInGermany is offline Forum Advisor  
Registered User
 
Join Date: May 2012
Last Activity: 27 March 2015, 5:12 PM EDT
Location: Simplicity
Posts: 2,298
Thanks: 158
Thanked 699 Times in 630 Posts
Ask the supercomputer guys ("superusers") if they have a solution.
For terminal sessions reconnection there is screen to be installed on the supercomputer.
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
ssh connection closed by ip makarand.bhatka AIX 1 04-08-2011 12:04 PM
Unable to SSH into machine - ssh_exchange_identification: Connection closed by remote host jaapar Red Hat 3 09-26-2010 07:48 AM
Duh, can I quit an ssh connection withOUT stopping a program running? jccbin Shell Programming and Scripting 3 10-30-2009 03:06 PM
Server unexpectedly closed network connection error in passwordless in ssh through vr_mari Solaris 1 06-25-2009 12:56 AM
ssh_exchange_identification: Connection closed by remote host Connection closed jeevan_fimare UNIX for Dummies Questions & Answers 1 02-05-2009 12:43 AM



All times are GMT -4. The time now is 01:48 AM.