tart
tart copied to clipboard
tart ssh
A command to open an SSH session with a named Tart VM, with optional authentication parameters
e.g.
tart ssh ubuntu
This is assuming the guest VM is already configured for SSH access, which may require user intervention.
It would also be useful to pass a command as an argument that then runs and exits, perhaps passing back a return code, e.g.
tart ssh ubuntu --command "echo 'hello world'"
Note that some of the rationale would be to allow programs like Vagrant to log in easily. For Vagrant's preconfigured boxes, they are usually configured with a default admin user like vagrant with password vagrant, and SSH is set up to run on port 22 by default. macOS can even be configured to run SSH the same way, which is highly convenient for those of us who enjoy automating macOS with Ansible ;)
Does ssh ubuntu@$(tart ip ubuntu) work for you?
That's a promising start. For vagrant at least we'll want to be sure we can put a vagrant user in the VM before running this and that an SSH daemon is running and inside the VM, I imagine we'd do this via packer? Does the Tart packer fork play well with non MacOS VMs?
This is probably going to be the easiest route to running provisioners in Vagrant beyond the scripts to build an images/boxes that get packaged
Since Tart itself is not storing information about user/password configured inside the VM, we can't do tart ssh and an integration will need to take care of it.