Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

ssh or sshd or what?

Hi. I ain't too computa smart so please take it easy on me.


My problem is with a home network - the following takes place behind a Nat router.


I have a MacBook pro upstairs with the ssh remote login system pref on. I can successfully log in from my iPad if it has not been too long since a reboot. Over time (I don't know how long or any commands to elicit such info, but its in the realm of an hour or two) the server seems to be stopping. I don't think it's the iPad since I have no such prob with another Linux server on the network. I assume it's stopping because I can't login. (The connection fails thru an app called goodreader, but also with a remote desktop app and another remote-y type app which sends nzb jobs to the MacBook.)


If I go to the MacBook and ssh the other server then the MacBook's server is back up and running.


This is not something I wish to do. Can anybody help?


MacBook pro is late 2008 unibody with latest SL.


Cheers in advance

Mac OS X (10.6.7)

Posted on Jun 9, 2011 8:47 AM

Reply
37 replies

Jun 9, 2011 6:06 PM in response to Wagringo

Edit /etc/sshd_config, and change LogLevel to DEBUG3.


sudo nano /etc/sshd_config


And change LogLevel to


LogLevel DEBUG3


Now stop and restart System Preferences -> Sharing -> Remove Login.


The next time you experience problems, look in

Applications -> Utilities -> Console -> FILES -> /private/var/log -> secure.log


This is where sshd logs its DEBUG3 messages.


See if there are any clues between previous successful ssh connections and when your connection fails.

Jun 18, 2011 6:01 PM in response to BobHarris

Right. So I was unable to connect last night again. The only thing that looks suspicious to me is this (tho bear in mind I know not what I am doing!):



Jun 16 13:55:50 cssaus loginwindow[38]: in pam_sm_authenticate(): Failed to determine Kerberos principal name.



Jun 18 14:38:44 cssaus loginwindow[38]: in pam_sm_authenticate(): Failed to determine Kerberos principal name.


Which I get at various times. Probably two or three times a day. Loginwindow, tho? Doesn't make sense to me. There are also a few of these messages:


Jun 16 14:06:33 cssaus com.apple.SecurityServer[23]: Killing auth hosts


Any ideas?


Cheers

Jun 22, 2011 7:50 PM in response to Wagringo

Did you try changing the LogLevel in /etc/sshd_config, and then stopping and restarting System Preferences -> Sharing -> "Remote Login"?


If you did, then you should see 'sshd' entries in the /var/log/secure.log file.

If you did change the LogLevel and you do not have any 'sshd' entries in secure.log, then your ssh requests are not reaching your Mac. If that is the case, then you need to either look at the address you entered in your ssh command, or if you are coming in across the internet, then you will need to look at your home router and whether you have correctly setup port 22 port forwarding in your home router.


If you are not reaching your Mac from inside your home, then I would ask if you have multipe routers in your home. Maybe a broadband modem with built-in router, and a separate WiFi base station which if you did not deactive its router functions would be a 2nd router. Now if one Mac is attached via the broadband modem/router and the other Mac was attached via the WiFi base station, then each Mac is sitting on a separate subnet with IP non-routing IP addresses.

Jun 22, 2011 8:12 PM in response to BobHarris

I thought I had done this, but I had not stopped and restarted remote login. I am now getting sshd messages; I shall keep an eye out.


quick re-cap:

All of this is happening behind a NAT router. (I am not yet attempting access from other side of the router)

All IP's in the house are fixed, there are no typo's being committed

There is only one router / AP in the house

Connection problem certainly seems to be related to the amount of time that the MBP is sitting "idle" upstairs.


Thanks very much for your help so far; connection is working fine at the moment since I am using the MBP. I shall give it some time to itself later on and check the logs.

Jun 23, 2011 5:26 AM in response to Wagringo

Are you by any chance using the csh or tcsh shell when you are ssh'ed into the othet system? csh/tcsh have an 'autologout' feature.


By default Mac OS X uses 'bash' as the shell which does not have autologout, however, if you have been upgrading since Mac OS X 10.2 or if you just prefer csh/tcsh, then you might have an 'autologout' variable set.


echo $version # on csh/tcsh will display the version

tcsh 6.15.00 (Astron) 2007-03-03 (x86_64-apple-darwin) options wide,nls,dl,al,kan,sm,rh,color,filec


echo $BASH_VERSION # on a bash shell will display the version

3.2.48(1)-release

Jun 23, 2011 7:39 AM in response to BobHarris

Hi again!

So it's been a few hours since using either device. All was working flawlessly earlier. Now I cannot contact the mbp from my iPad, as is typical of the situation.

I am getting no response at all from the mbp when trying to ping it (from iPad). So now I am less sure of it being any kinda ssh issue, but I don't really know much about any of this stuff.

I can successfully ping the other media box server from the iPad, and similarly from the mbp, but there's nothing going between mbp and iPad.


Me dont know what to do

Jun 23, 2011 7:58 AM in response to Wagringo

I am getting no response at all from the mbp when trying to ping it (from iPad). So now I am less sure of it being any kinda ssh issue...


It's certainly not an SSH issue. It has nothing to do with SSH. It's a network issue. So the question is whether the iPad or the MBP is at fault, or neither.


When you're unable to ping the MBP from the iPad, can you ping the MBP from your Linux box? Can you ping the Linux box from the iPad?

ssh or sshd or what?

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