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

  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 Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 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 02-15-2013
cero cero is offline
Registered User
 
Join Date: Aug 2006
Last Activity: 19 December 2014, 11:12 AM EST
Posts: 386
Thanks: 4
Thanked 71 Times in 65 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 02-15-2013
MadeInGermany MadeInGermany is offline Forum Advisor  
Registered User
 
Join Date: May 2012
Last Activity: 18 December 2014, 1:32 AM EST
Location: Simplicity
Posts: 2,089
Thanks: 140
Thanked 613 Times in 556 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 Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 01:04 PM
Unable to SSH into machine - ssh_exchange_identification: Connection closed by remote host jaapar Red Hat 3 09-26-2010 08:48 AM
Duh, can I quit an ssh connection withOUT stopping a program running? jccbin Shell Programming and Scripting 3 10-30-2009 04:06 PM
Server unexpectedly closed network connection error in passwordless in ssh through vr_mari Solaris 1 06-25-2009 01:56 AM
ssh_exchange_identification: Connection closed by remote host Connection closed jeevan_fimare UNIX for Dummies Questions & Answers 1 02-05-2009 01:43 AM



All times are GMT -4. The time now is 10:14 PM.