2
2
Does anyone have a clear step-by-step guide for setting up a shared tmux session on a Vagrant vbox that my coworkers (on our local office lan) could SSH into? The articles I've found online only seem to cover setting this up from machine to machine (no virtualbox setups), and I'm not very good at networking, so I haven't been able to extrapolate a solution...
We're all running the latest Macs in our office, btw.
Here's one article I've found but haven't been able to get working with Vagrant: http://blog.voxdolo.me/remote-pairing-with-vim-and-tmux.html
EDIT: To clarify, I don't really know how I should be setting up Vagrant to allow me to SSH into it from a machine outside the one hosting the VM. The article above suggests that I add the tunnels
host on my physical machine running the VM (here-on referred to as the MBP), so I did that. Next is the ProxyCommand
host declaration, which I have also assumed should live on the MBP.
So next I try SSHing into the MBP from a guest machine (another separate physical machine on my network), and that seems to work... but that only gets me into the MBP, not the Vagrant image running on the MBP.
I normally login Vagrant image on the MBP via vagrant ssh
(per the docs), and I know how to forward ports on the Vagrant VM to the MBP, but it's unclear to me how I could forward ports/SSH from the MBP to the Vagrant VM, which I assume I would need to do so that my guest machine could SSH in--through the MBP--to my Vagrant image.
That, in a nutshell, is what I'm trying to accomplish. I do my development work in Vagrant VMs which keeps my MBP nice and clean of any dev-related cruft and also keeps my dev environments totally isolated from one another, yet I would like to start pair-programming with my coworkers via tmux, thus the reason why I've asked this question.
I would like to accomplish all of this without setting up an additional user account on the MBP, or giving my coworkers access to my local user account on the MBP to get to my Vagrant VM, if that's at all possible.
UPDATE: Been trying to setup a bridged connection, per @John Whitley's suggestion, and I've been unsuccessful so far.
I have a new network adapter on my vagrant image set to bridged, tied to my AirPort interface on my host computer:
I then can vagrant ssh
into the box and run ifconfig
and see that it as the IP of 10.0.2.151
:
But when I open up a new terminal session on my host machine and try to ping that address, I don't get anything:
I noticed that the Vagrant docs, on the section for bridged networking (http://vagrantup.com/v1/docs/bridged_networking.html), seem to list the bridged device as eth2
and have an elipses before that, suggesting that there might also be an eth1
device active with a different IP. My ifconfig
on the vagrant box doesn't have two separate adapters. I am prompted when booting up the vagrant image:
To which I always reply 1
for my Airport, which I assume I should be doing. Any thoughts on getting this working? My Vagrant box can still talk out to the internet, and port forwarding still works...
1More details, please. We don't know how it doesn't work for you or even at which step you are blocked. What works? What doesn't? Can you even SSH into one of those VMs? Did you talk to the IT department? – romainl – 2012-06-14T04:28:03.993
Well, tmux sessions are shared by default, so that part should not pose a problem. Just connect to it normally from multiple locations. – Daniel Andersson – 2012-06-14T08:01:31.910
@romainl See my update; did my best to explain what I've tried so far. Again, SSH beyond the basics is not my forte... – neezer – 2012-06-14T15:57:52.787