SSH : launch task and leave it running even if I quit the terminal [duplicate]

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite













This question already has an answer here:



  • How can I make a process I start during an SSH session run after the session has ended? [duplicate]

    2 answers



  • Keep SSH Sessions running after disconnection

    8 answers



I want to launch a task through ssh and then exit my terminal and have my task continuing on my ssh server.



I have tried a bunch of things which did not work, such as :



laptop$ ssh server@ipaddress
server$ mytask &
[1] 12345
server$ logout


Or



laptop$ ssh server@ipaddress
server$ mytask
(then hit [Ctrl]+[Z])
server$ logout


Or even



laptop$ ssh server@ipaddress -f "mytask"
(and then close my terminal)


But even in my last attempt, closing my terminal would stop the task.



How should I proceed?



Thanks in advance!!







share|improve this question














marked as duplicate by Kusalananda bash
Users with the  bash badge can single-handedly close bash questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Feb 17 at 11:39


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 1




    I think you need nohup tool ssh userid@host "nohup command & " then you an close your local terminal but task will follow its own execution on remote host
    – francois P
    Feb 17 at 11:40







  • 1




    ... or leave the connection open (with ssh -n), but nohup is better.
    – Ned64
    Feb 17 at 11:41










  • @francoisP Why don't you make an answer out of your suggestion? It can be one.
    – Ned64
    Feb 17 at 11:42










  • see also unix.stackexchange.com/questions/479/…
    – cas
    Feb 17 at 11:42










  • Thank you very much @francoisP !! That's exactly what I needed :)
    – Johannes Lemonde
    Feb 17 at 11:53














up vote
0
down vote

favorite













This question already has an answer here:



  • How can I make a process I start during an SSH session run after the session has ended? [duplicate]

    2 answers



  • Keep SSH Sessions running after disconnection

    8 answers



I want to launch a task through ssh and then exit my terminal and have my task continuing on my ssh server.



I have tried a bunch of things which did not work, such as :



laptop$ ssh server@ipaddress
server$ mytask &
[1] 12345
server$ logout


Or



laptop$ ssh server@ipaddress
server$ mytask
(then hit [Ctrl]+[Z])
server$ logout


Or even



laptop$ ssh server@ipaddress -f "mytask"
(and then close my terminal)


But even in my last attempt, closing my terminal would stop the task.



How should I proceed?



Thanks in advance!!







share|improve this question














marked as duplicate by Kusalananda bash
Users with the  bash badge can single-handedly close bash questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Feb 17 at 11:39


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 1




    I think you need nohup tool ssh userid@host "nohup command & " then you an close your local terminal but task will follow its own execution on remote host
    – francois P
    Feb 17 at 11:40







  • 1




    ... or leave the connection open (with ssh -n), but nohup is better.
    – Ned64
    Feb 17 at 11:41










  • @francoisP Why don't you make an answer out of your suggestion? It can be one.
    – Ned64
    Feb 17 at 11:42










  • see also unix.stackexchange.com/questions/479/…
    – cas
    Feb 17 at 11:42










  • Thank you very much @francoisP !! That's exactly what I needed :)
    – Johannes Lemonde
    Feb 17 at 11:53












up vote
0
down vote

favorite









up vote
0
down vote

favorite












This question already has an answer here:



  • How can I make a process I start during an SSH session run after the session has ended? [duplicate]

    2 answers



  • Keep SSH Sessions running after disconnection

    8 answers



I want to launch a task through ssh and then exit my terminal and have my task continuing on my ssh server.



I have tried a bunch of things which did not work, such as :



laptop$ ssh server@ipaddress
server$ mytask &
[1] 12345
server$ logout


Or



laptop$ ssh server@ipaddress
server$ mytask
(then hit [Ctrl]+[Z])
server$ logout


Or even



laptop$ ssh server@ipaddress -f "mytask"
(and then close my terminal)


But even in my last attempt, closing my terminal would stop the task.



How should I proceed?



Thanks in advance!!







share|improve this question















This question already has an answer here:



  • How can I make a process I start during an SSH session run after the session has ended? [duplicate]

    2 answers



  • Keep SSH Sessions running after disconnection

    8 answers



I want to launch a task through ssh and then exit my terminal and have my task continuing on my ssh server.



I have tried a bunch of things which did not work, such as :



laptop$ ssh server@ipaddress
server$ mytask &
[1] 12345
server$ logout


Or



laptop$ ssh server@ipaddress
server$ mytask
(then hit [Ctrl]+[Z])
server$ logout


Or even



laptop$ ssh server@ipaddress -f "mytask"
(and then close my terminal)


But even in my last attempt, closing my terminal would stop the task.



How should I proceed?



Thanks in advance!!





This question already has an answer here:



  • How can I make a process I start during an SSH session run after the session has ended? [duplicate]

    2 answers



  • Keep SSH Sessions running after disconnection

    8 answers









share|improve this question













share|improve this question




share|improve this question








edited Feb 17 at 12:36









Jeff Schaller

31.2k846105




31.2k846105










asked Feb 17 at 11:37









Johannes Lemonde

32




32




marked as duplicate by Kusalananda bash
Users with the  bash badge can single-handedly close bash questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Feb 17 at 11:39


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Kusalananda bash
Users with the  bash badge can single-handedly close bash questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Feb 17 at 11:39


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









  • 1




    I think you need nohup tool ssh userid@host "nohup command & " then you an close your local terminal but task will follow its own execution on remote host
    – francois P
    Feb 17 at 11:40







  • 1




    ... or leave the connection open (with ssh -n), but nohup is better.
    – Ned64
    Feb 17 at 11:41










  • @francoisP Why don't you make an answer out of your suggestion? It can be one.
    – Ned64
    Feb 17 at 11:42










  • see also unix.stackexchange.com/questions/479/…
    – cas
    Feb 17 at 11:42










  • Thank you very much @francoisP !! That's exactly what I needed :)
    – Johannes Lemonde
    Feb 17 at 11:53












  • 1




    I think you need nohup tool ssh userid@host "nohup command & " then you an close your local terminal but task will follow its own execution on remote host
    – francois P
    Feb 17 at 11:40







  • 1




    ... or leave the connection open (with ssh -n), but nohup is better.
    – Ned64
    Feb 17 at 11:41










  • @francoisP Why don't you make an answer out of your suggestion? It can be one.
    – Ned64
    Feb 17 at 11:42










  • see also unix.stackexchange.com/questions/479/…
    – cas
    Feb 17 at 11:42










  • Thank you very much @francoisP !! That's exactly what I needed :)
    – Johannes Lemonde
    Feb 17 at 11:53







1




1




I think you need nohup tool ssh userid@host "nohup command & " then you an close your local terminal but task will follow its own execution on remote host
– francois P
Feb 17 at 11:40





I think you need nohup tool ssh userid@host "nohup command & " then you an close your local terminal but task will follow its own execution on remote host
– francois P
Feb 17 at 11:40





1




1




... or leave the connection open (with ssh -n), but nohup is better.
– Ned64
Feb 17 at 11:41




... or leave the connection open (with ssh -n), but nohup is better.
– Ned64
Feb 17 at 11:41












@francoisP Why don't you make an answer out of your suggestion? It can be one.
– Ned64
Feb 17 at 11:42




@francoisP Why don't you make an answer out of your suggestion? It can be one.
– Ned64
Feb 17 at 11:42












see also unix.stackexchange.com/questions/479/…
– cas
Feb 17 at 11:42




see also unix.stackexchange.com/questions/479/…
– cas
Feb 17 at 11:42












Thank you very much @francoisP !! That's exactly what I needed :)
– Johannes Lemonde
Feb 17 at 11:53




Thank you very much @francoisP !! That's exactly what I needed :)
– Johannes Lemonde
Feb 17 at 11:53















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
v Dp Rsj,MWa 30Fice5q0mk6 BRynOhXYF7g7dz,Vu2,Wdz,Zew1RMT,pe
HagbFmIhQ45ybNpKgldB0Q quN0tn3,UMxYoh5K1B1m,mn1FLnkVmQWyMAgvdo8ppon,M6,eTSI4ZGvk2fwiL D0gLhmiOdx0b

Popular posts from this blog

How to check contact read email or not when send email to Individual?

How many registers does an x86_64 CPU actually have?

Displaying single band from multi-band raster using QGIS