10.4: Remove SSH connection delay

May 13, '05 09:34:00AM

Contributed by: autarkeia

Tiger only hintAfter upgrading to Tiger, I noticed an infuriatingly long delay when trying to connect to remote hosts via SSH in Terminal.

After some poking around, I finally figured out that SSH under 10.4 is checking for IPv6 addresses as well as IPv4 addresses, and is hanging until its search times out. The solution is simple:

  1. Open up Terminal

  2. Edit the /etc/ssh_config file as root (note this is not /etc/sshd_config). Just type sudo emacs /etc/ssh_config; replace emacs with your favorite editor

  3. Add the following line to the file:
    AddressFamily inet
  4. Save and close the file. Under emacs this is done via Control-X Control-C Y
That's it! Enjoy normal SSH connections again...

Comments (10)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050503190955329