Giving keyboard inputs to a nohup program

314 Views Asked by At

I know that when doing some ssh, I can use the nohup command to prevent a program execution from halting when I close the ssh session. However, I need to run a program that takes some keyboard input at the beginning. When I run it, I am prompted with several questions that I need to manually answer, then the program will actually start doing what it is meant to do and then I would like to close my connection and let it run in the background. How can I do this? My ideal solution would be some sort of "persistent ssh session" or so, something that would allow me to start a program, give it inputs via keyboard, the program gives me terminal output, then I close the connection, open it again and still see the program running, its output and so on, like if I just opened it without disconnecting and reconnecting.

Is there any way to do such a thing?

Thank you very much.

0

There are 0 best solutions below