SSH cannot run in background

166 views
Skip to first unread message

stonebe...@gmail.com

unread,
Jul 6, 2020, 4:03:39 PM7/6/20
to Serveo Help and Discussion
Hi there,
I‘m not sure if anyone else encountered this problem.
I can successfully run this "ssh -o ServerAliveInterval=60 -T -R <mysubdomain>:80:localhost:<myserviceport> serveo.net" in my ubuntu 20.04
However, if I add an "&" in the end of the command to make it a background process, the process will show "Stopped" in the console within one second.
If I do "ps -ux | grep serveo", I can still see the newly created ssh process.
I guess it is related to ssh parameters but I'm not sure how to resolve it.

Could anyone help?

PS: interestingly, I did ran the same ssh command in background on another computer, and things went well. 

Thanks.
Edward

Al Xu

unread,
Jun 1, 2023, 9:16:38 PM6/1/23
to Serveo Help and Discussion
try
ssh -o ServerAliveInterval=60 -R <mysubdomain>:80:localhost:<myserviceport> serveo.net  screen -d -m >output.txt &

Reply all
Reply to author
Forward
0 new messages