How to avoid kickout from SSH when script fail
1
vote
2
answers
135
views
Please forgive my basic unix/linux scripting skill and poor English
I am testing a script in the Linux VM, let's say it is
work.sh
. So I have to ssh to the VM
ssh myname@theVm.domain.app
with my access, then I need to run the script in my home folder
[myname@theVm.domain.app ~]. work.sh param1 param2
When something goes wrong in the batch script, I can see the error but also get kicked out of the VM/ssh session
Connection to myname@theVm.domain.app closed.
so I have to log back in.
I tried nohup, but I also like to have any error/log output to the console. What is the better way to handle this situation
Asked by Dreamer
(115 rep)
Oct 24, 2023, 07:08 PM
Last activity: Dec 15, 2023, 04:49 AM
Last activity: Dec 15, 2023, 04:49 AM