简体   繁体   中英

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

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?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM