Tweaks for Slow SSH from a Mac to Linux based Fusion VMs Running avahi

I create lots of little VMs in Fusion for doing demos and experiments, and what-not.  To make life a little easier with all these little VMs, I like using avahi to provide automatic mDNS without having to configure the hosts file on my Mac or having to futz around with a DNS.  It makes things really simple as all I have to do is set the host name on the VM machine, and then make sure avahi-daemon is installed and running.  However, there are a few tweaks I need to perform to make sure that avahi works well in this type of a setup.

First I disable IPv6 in the VMs.  Fusion doesn't allow IPv6 over it's NAT'ed network as of Fusion 6, so to prevent slow downs due to the Mac trying to connect to the VMs over IPv6, it's best to make sure that the VM isn't using it.  If you allow the VMs to directly connect, then IPv6 is ok, but I don't like to have to have a network attached to my machine just to start up the VMs.  For CentOS 6, if use the procedure at http://wiki.centos.org/FAQ/CentOS6#head-d47139912868bcb9d754441ecb6a8a10d41781df.  If for some reason you want to use IPv6, then you'll just need to make sure the VMs are direct attached.  Another alternative would be to use a private network, with a "Jumphost" type machine attached to the same private network.

For my setup with NAT'ed addressing, I also needed to tell the Mac to not try and connect over IPv6 with SSH.  I used a derivation of the instructions at http://ubuntuforums.org/showthread.php?t=1865873 to force the Mac to not use IPv6 to connect to SSH servers.  The difference on the Mac is that the ssh config file is actually at /etc/ssh_config.  Without doing this, I was noticing that SSH connections were stalling a bit before the password prompt.  I believe this is a bit of a hack-y workaround, but I'll use it until I find a better way.

Comments

Popular posts from this blog

Using Snapshot Isolation with SQL Server and Hibernate

FreeNAS, CIFS, and user login problems

Official Pandora Desktop and Hotkey Support?