SSH, AFS, and Network Preferences

I am having an issue with SSH hanging on my MBP. This only happens to me once I get home from work after I have used SSH while at work. The three factors I have narrowed the issue down to are SSH, our work AFS network drive and the method of network connectivity.

At work we use an AFS drive with Kerberos Authentication to do all of our software development work on. I authenticate with Kerberos in order to gain access to the AFS drive where all my source code lives, but I open a local editor (Eclipse) which references the files on the AFS drive. Whenever I need to compile my code, I SSH in to my development server (which is also authenticated to the AFS drive) and compile from there. (Sanity Note: I know that it is a super wacky setup, but I promise I had NOTHING to do with it. I'm just making do with what I've got.)

For my Network Preferences, I use the Automatic location all the time. For that configuration I have Built-in Ethernet en1 configured to use DHCP and our company's DNS server for when I'm at work (there is no wireless available). When I go home I connect to my home network via wireless, again using DHCP.

I have a hunch that the AFS connection/Ethernet configuration is somehow the culprit here. Restarting the SSH daemon doesn't correct the problem. The only way I have found to correct the issue is by restarting the computer each time I want to use SSH. Keep in mind that I have no other (known) networking issues while at home after I've had the laptop at work.

I have a co-worker who has reported to me the same issue on his MBP.

I'm truly stumped on this one. Please provide some guidance. Thanks!

15" MBP 4,1, Mac OS X (10.5.5), 250 gb drive, 2gb ram, 2.4 ghz Intel Core 2 Duo

Posted on Nov 13, 2008 1:51 PM

Reply
6 replies

Nov 13, 2008 8:50 PM in response to BobHarris

The output is as follows:

bj@rand9 ~/: ssh -v -v -v server
OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /Users/my_user/.ssh/config
debug1: Applying options for severus
debug1: Reading configuration data /etc/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to rand9.com [xxx.xx.xx.xxx] port 22.
debug1: Connection established.
debug1: identity file /Users/my_user/.ssh/identity type -1
debug1: identity file /Users/my user/.ssh/idrsa type -1
debug3: Not a RSA1 key file /Users/my user/.ssh/iddsa.
debug2: key type_fromname: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug2: key type_fromname: unknown key type 'Proc-Type:'
debug3: key_read: missing keytype
debug2: key type_fromname: unknown key type 'DEK-Info:'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: key type_fromname: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /Users/my user/.ssh/iddsa type 2
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.0
debug1: match: OpenSSH_5.0 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1
debug2: fd 3 setting O_NONBLOCK
debug1: Unspecified GSS failure. Minor code may provide more information
Cannot contact any KDC for requested realm

debug1: Unspecified GSS failure. Minor code may provide more information
Cannot contact any KDC for requested realm

debug1: Unspecified GSS failure. Minor code may provide more information

debug1: SSH2 MSGKEXINIT sent
Write failed: Broken pipe

Message was edited by: thelocalshredder

Nov 14, 2008 7:33 AM in response to thelocalshredder

You should repeat the -v -v -v experiment after rebooting your Mac. Then compare and contrast a successful connection against a failed connection. That might help point out to the component that is misbehaving.

I have not used Kerberos, so I do not know what to expect in that regards.

The other thing you can do is enable sshd logging on the server (see *man sshd_config*).

Nov 16, 2008 12:04 AM in response to BobHarris

The successful attempt output using three -v's is as follows:

bj@rand9 ~: ssh -v -v -v user@server
OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /Users/my_user/.ssh/config
debug1: Applying options for severus
debug1: Reading configuration data /etc/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to myserver.com [xxx.xx.xx.xxx] port 22.
debug1: Connection established.
debug1: identity file /Users/my_user/.ssh/identity type -1
debug1: identity file /Users/my user/.ssh/idrsa type -1
debug3: Not a RSA1 key file /Users/my user/.ssh/iddsa.
debug2: key type_fromname: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug2: key type_fromname: unknown key type 'Proc-Type:'
debug3: key_read: missing keytype
debug2: key type_fromname: unknown key type 'DEK-Info:'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: key type_fromname: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /Users/my user/.ssh/iddsa type 2
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.0
debug1: match: OpenSSH_5.0 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1
debug2: fd 3 setting O_NONBLOCK
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found

debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found

debug1: Unspecified GSS failure. Minor code may provide more information


debug1: SSH2 MSGKEXINIT sent
debug1: SSH2 MSGKEXINIT received

... (much more follows) ...
----

The last line "...KEXINIT received" does not exist when I try and make the connection before restarting. I haven't done any research on what that means yet, but I'll be looking into it tonight.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

SSH, AFS, and Network Preferences

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.