Linkdump

» Best Online Sudoku I'm addicted to Miniclip's Sudoku. It's Flash, and the best interface I've found yet. Then if I get stuck, I use Sudoku Solver by Andrew Stewart. Mmmm, Sudoku.   No comments |
» DabbleDB

DabbleDB, a new Web 2.0 way to manage databases. VERY very slick. Watch the demo.

  No comments |

| Home |

OSX, ssh, FreeBSD, login delays and a glass of red wine

Thursday 13 September 2007 at 12:28 am. Used tags: , , ,

I won’t bore the lot of you that could give two cents for what information I am about to offer. It’s extremely geeky, but it sucked up my entire evening of what could have been a productive night. To allow the rest of you having this problem to enjoy a productive and happy evening without banging your head against a wall, I’m sharing my solution to this annoying problem.

Don’t wanna read my blatherings? Add this to your ~/.ssh/config:

GSSAPIKeyExchange no

Voila, no more delays. No server config changes either. Hope you don’t have to use Kerberos! :-)

Read on to see how I got to this solution.

So a new hosting company set up two fresh from ISO 6.2 installs and enabled sshd for me. Using my trusty running 10.4.9, I attempted to connect to my brand-spanking new servers. When I ‘ed to the boxes, there was a 30-60 second delay before I got the password: prompt. Believing it to be the standard reverse DNS problem, I mucked with the nameserver entries in /etc/resolv.conf, but to no avail. I started playing around with __ UseDNS yes or no __ settings in the /etc/ssh/sshd_config, but still no luck. It’s starting to piss me off, and my red wine levels are dwindling.

I google, I yahoo, I search mailing lists on FreeBSD.org and the MacOSXhints.com Forums but I still fail at finding the issue. I can see the problem:

debug1: Remote protocol version 2.0, remote software version OpenSSH_4.5p1 FreeBSD-20061110 debug1: match: OpenSSH_4.5p1 FreeBSD-20061110 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_4.5 !!! 30-60 second delay !!! debug1: Miscellaneous failure No credentials cache found

I make an educated guess that it is something Kerberos-related, so I disable anything Kerberos related in my servers sshd_config, but that doesn’t help. So I keep searching. Finally I discuss the issue with my genius geek friend Jay and he says he’s having the same problem, but had given up trying to solve it.

“well – I’ve given up… I tried for a couple hours and then said ‘screw it, nobody’s paying me for this.’ and that was pretty much that.” – Jay Kuri

Jay did mention something about Kerberos, which I had tried and seen mentioned with the whole “credentials” thing, but passed over when I tried disabling it on the server. I finally came across this blog entry and it suggested to add some GSSAPI config vars to your sshd_config. Well I already tried that, but, hey, let’s throw them in the /etc/ssh_config on my OS X MBP.

Poof! No more delays. All I added to my ~/.ssh/config was:

GSSAPIKeyExchange no

Stupid, stupid OpenSSH sucked 2 hours of my life. Damnit.

three comments

Luis

Hey Beckman, this is like magic! The perfect solution! It fixed my OS X servers and now I’m free of this annoying ssh delay. Thanks.

Luis

Luis (Email) - 04-07-’08 08:35
<span class='registered'>beckman</span>

@Luis: glad it helped! I appreciate the feedback. Always good to know when my random rantings help someone out.

beckman (URL) - 07-07-’08 16:22
Lennie

Just plain luck I guess, I did it in 30 minutes. ;-)

Lennie - 25-02-’09 17:36


Emoticons
To prevent automated comment-spam, we require you to answer this silly question.
Remember personal info?
Notify
Hide email
Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.
 

Beckman

I'm a big geek, serial entrepreneur and idea guy. I've been called names, such as PHP Guru, MySQL DBA, BOFH, Security God, etc. That and Peter-Peter-Pumpkin-Eater.

The image in the header is © Peter Beckman.

Tag cloud

Archives

Last Comments

Links

To change the links in this list, edit the file '_sub_link_list.html' in the pivotx/templates/default/ folder. You can do this by directly editing the file, or you can go to 'Manage Media' » 'Templates' in the PivotX interface.

Search

Stuff

Powered by PivotX - 2.0.2
XML: RSS Feed
XML: Atom Feed

Add to Technorati Favorites