问题描述
我正在尝试在本地计算机上运行bash脚本,以在SSH屏幕上启动一个长期运行的进程并退出。
屏幕和长时间运行的进程运行正常。
但是在我的主机上,脚本挂起,必须手动将其终止。
ssh -tt $SSH_URL <<EOT
screen -d -r my_session
# some commands or just do nothing
screen -d
EOT
这无限期地发生。
PS:here解释了终止SSH会话(非屏幕)
我正在尝试在本地计算机上运行bash脚本,以在SSH屏幕上启动一个长期运行的进程并退出。
屏幕和长时间运行的进程运行正常。
但是在我的主机上,脚本挂起,必须手动将其终止。
ssh -tt $SSH_URL <<EOT
screen -d -r my_session
# some commands or just do nothing
screen -d
EOT
这无限期地发生。
PS:here解释了终止SSH会话(非屏幕)