Vagrant ssh using -c or --COMMAND causes the sessi

2019-08-26 01:53发布

问题:

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.