Is it possible for the server-side to run the administrator command without explicitly entering the password, and at the same time nohup?

Author: CryptoMethod, Created: 2021-12-25 17:30:15, Updated: 2021-12-25 17:39:21

Currently, if you want to start an admin program on the server side and the program can continue to run after you log out of ssh, the official method is:nohup ./robot -s node.fmz.com/xxxxx -p yourFMZPasswork &

However, this method is very insecure, and the password is explicitly entered into the startup command. Someone who logs on to the server using ps-aux to view the current startup process is able to see the password. The host program itself supports interactive input passwords, which can be entered first../robot -s node.fmz.com/xxxxxThe user will be asked to enter the password. But this method doesn't work if you need to exit ssh without hanging (nohup), i.e. inputnohup ./robot -s node.fmz.com/xxxxxI can't start the program correctly.

Please tell me if there is a way to do this without explicitly requiring the password to be written in the command statement, but nohup can also start the host program.


More

The Little DreamIt can be run with the screen tool. Or directly. /robot, which currently hosts can run directly, will not stop itself when disconnected from SSH.

CryptoMethodIt has been found that screen can be used as a substitute for nohup. ```screen -S yourScreenName ``` // Create a screen and give it a name. I'm going to have to go to the gym and get some sleep. Enter the password ctrl+z // to pause the current program and put it in the background ``bg ``` // Restart the program in the background Ctrl+a d // detach the current screen and return to the interface before entering the screen. This allows you to safely exit the ssh login while keeping the programs running on the screen running. The next time you log in, use screen -r yourScreenName to re-enter the previous screen.

The grassNow you can also go directly to the front, launching ssh will not quit.