SSH : launch task and leave it running even if I quit the terminal [duplicate]
Clash 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!!
ssh command-line terminal
marked as duplicate by Kusalananda
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.
add a comment |Â
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!!
ssh command-line terminal
marked as duplicate by Kusalananda
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 toolssh 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 (withssh -n
), butnohup
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
add a comment |Â
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!!
ssh command-line terminal
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
ssh command-line terminal
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
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
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 toolssh 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 (withssh -n
), butnohup
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
add a comment |Â
1
I think you need nohup toolssh 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 (withssh -n
), butnohup
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
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
), butnohup
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