0
Follow
0
Followers
目前如果在服务器端想启动托管者程序,且退出ssh登录后该程序能一直运行,官方给出的方法是:
nohup ./robot -s node.fmz.com/xxxxx -p yourFMZPasswork &
但是这种方式十分不安全,密码显式输入到启动命令里。别人登录服务器使用ps -aux查看当前启动进程,是能够看到这个密码的。
托管者程序本身是支持交互式输入密码,可以先输入./robot -s node.fmz.com/xxxxx,然后程序会让输入密码。
但是这种方式在需要退出ssh不挂断(nohup)的情况下不生效了,即输入nohup ./robot -s node.fmz.com/xxxxx 无法正确启动程序。
请问有没有什么方式,能够不要求把密码显式写到命令语句里,但也能nohup启动托管者程序。
Related Recommendations
Built-In Function_Cross Analysis and InstructionsHow to Specify Different Versions of Data for the Rented Strategy by Its Rental Code MetadataAdvanced Tutorial for FMZ Quant platform Strategy WritingElementary Tutorial for FMZ Quant platform Strategy WritingGet Started with FMZ Quant PlatformSECURITY BUGI keep getting error: Exchange_GetAccount: Invalid ContractTypeWe have an incredibly profitable market making algorithm for sideways markets on Bitmex - but need expert to help eliminate wait times during downward volatility in the marketError with deribitLimitations of the backtesting engine
Comment
All comments (3)
发现可以用screen来替代nohup功能。具体步骤如下:
screen -S yourScreenName // 创建一个screen,并赋予一个名字。之后会进入一个screen里面。
./robot -s node.fmz.com/xxxxx
输入密码
ctrl+z //将当前程序暂停运行,并放置到后台
bg // 将后台程序恢复运行
ctrl+a d // detach当前screen,回到原来进入screen前的界面。这时就可以安全退出ssh登录,同时能保持screen里面运行的程序继续运行。
下次再登录后,使用 screen -r yourScreenName 来重新进入上次的scree。
5 years ago
- 1

