Vagrant ssh using -c or --COMMAND causes the session to close

天大地大妈咪最大 提交于 2019-12-11 19:36:17

问题


I have an issue with vagrant executing commands over ssh. The session terminates after acknowledging my command.

For example if I type

vagrant ssh -c "echo hello"

hello will appear in the terminal and then the session closes.

Other than config.ssh.timeout is there any other setting I should check or change?


回答1:


That's the expected behavior. Just like in normal ssh <command>, the command is run and session closed after the commend exits. This is also documented.



来源:https://stackoverflow.com/questions/21518551/vagrant-ssh-using-c-or-command-causes-the-session-to-close

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!