3 ms·
>vagrant ssh-config --host clientvm >> $HOME/.ssh/config You may want to instead do: vagrant ssh-config --host clientvm > $HOME/.ssh/config.vagrant and a
by Arnavion 6y ago
>vagrant ssh-config --host clientvm >> $HOME/.ssh/config
You may want to instead do:
vagrant ssh-config --host clientvm > $HOME/.ssh/config.vagrant
and add:
Include config.vagrant
to ~/.ssh/config. Otherwise if you delete your VM and make a new one, the entry from the old one is going to stay in your main ssh config, so it's going to fill up with cruft over time.
- cat199 6y agoto add, same mechanism can be used for multiple 'config.vagrants', 1x per host, to allow the output redirect to only config for 1 host at a time
- yjftsjthsd-h 6y agoI just use Include config.d/*