![]() |
Remote login stopped working!
I'm not exactly sure when this happened--probably less than 1 month ago--but remote login has (mostly) stopped working on my computer. I can still log in from the other computer on my home network, but not from any computer outside the network. I don't have a firewall and I don't think my ISP has anything to do with it because I can still log in to the other computer I have at home.
When I try to log in, I find the following message in my system log: Jan 25 17:55:11 Juliet xinetd[5707]: START: ssh pid=5776 from=xxx.xxx.xxx.xxx Jan 25 17:57:12 Juliet sshd[5776]: fatal: Timeout before authentication for xxx.xxx.xxx.xxx Here's what a login from a machine on the local net looks like: Jan 25 17:58:07 Juliet xinetd[5707]: START: ssh pid=5781 from=192.168.112.1 Jan 25 17:59:43 Juliet sshd[5781]: Accepted publickey for XXXXX from 192.168.112.1 port 49405 ssh2 Does anyone know what that "Timeout before authentication" error is all about? Has my SSH daemon somehow gotten misconfigured? I'm running Mac OS 10.3.7 with all security updates. (The other computer on my home network is running 10.2.8.) |
Check if your 'sshd' user-account is still there:
nidump passwd / | grep ssh You should get: sshd:*:75:75::0:0:sshd Privilege separation:/var/empty:/usr/bin/false And I'm assuming that you have tried restarting your Mac. |
Quote:
Quote:
|
You could try turning on debugging mode in sshd via the "-d" option. You first need to find out where sshd is started from - if I recall correctly it is started via xinetd so look in /etc/xinetd.d
|
Problem solved, cause still a mystery
I studied the sshd man page and, on a hunch, decided to try the "-g 0" flag to sshd. Hayne, you are correct: I had to modify the file /etc/xinetd.d/ssh and change the line
server_args = -i to server_args = -i -g 0 I then had to turn remote login off and back on again in the "Sharing" pane. This worked, although it takes a very long time to log in (about 2 minutes). There's a recent thread http://forums.macosxhints.com/showthread.php?t=32784 suggesting that turning off IPV6 might help, but it didn't help me. I also tried the debugging flag. Turning on debugging in the xinetd configuration file caused SSH to fail immediately. So I had to launch it from the command line using sudo sshd -d. And suddenly it works! However if I launch from the command line without the debugging flag, it doesn't work. So the debugging flag is also causing the problem to disappear. My current hypothesis is that the delay has something to do with the following message that appears now, after a successful login: Jan 25 19:36:02 Juliet sshd[7384]: reverse mapping checking getaddrinfo for hidden.hostname.com failed - POSSIBLE BREAKIN ATTEMPT! Anyone know how to fix that? |
It's starting to sound like your problems might be merely slow DNS servers.
|
No, not slow DNS servers, his source address doesn't reverse resolve. Either get your DNS fixed or add it to "/etc/hosts" (or the equivalent, I'm at work and not on a mac right now)
|
What is reverse resolution?
Quote:
|
Yeah it shows in the message, but it wasn't REVERSE-resolved to get it. Add your source IP to /etc/hosts on the sshd server and it should work.
|
Hello There,
We have been having the same issues here. Ho wdo we add a source IP to the etc/hosts file. I can view it when mounting the server. How should the information be formatted? TIA - Vijay |
Quote:
|
I hope this isn't off-topic, but someone here might know the answer. I have noticed a real slowdown in connecting to my server. I read the hint earlier about disabling IPv6, but that doesn't seem to have helped. In perusing this thread though, I took a look at my /etc/xinetd.d/ssh file and noticed this:
Code:
service sshCode:
Feb 2 10:25:00 Dereks xinetd[419]: service ssh, IPV6_ADDRFORM setsockopt() failed: Protocol not available (errno = 42) |
[QUOTE=derekhed]
Code:
service sshI have: Code:
{ |
Does "everything works fine" mean it works faster? Did you have a speed problem? I will try this anyway, thanks for being the guinea pig!
Quote:
sudo pico /etc/hosts Note the format already existing in the file. Here is a sampling of mine: Code:
127.0.0.1 localhost www.testder.com |
Nope....
It still takes just over 40 seconds to get the password prompt, though I no longer get the IPv6 error in my system.log. Oh well, RTFM.
|
I reset my Network settings in the System Preferences and removed all DNS entries. Now my connections are extremely fast. I am not sure why doing this made a difference, but suspect my prefs might have been corrupted. Anyhow, hope this might help someone else.
|
Hi,
To get sshd to listen on IPv4 only, add "-4" to the server_args and tell xinetd to only use IPv4 in /etc/xinet.d/ssh example: Code:
service sshNB: if you connected remotely, this will kick you off the system. Code:
bigmac:~ root# killall -HUP xinetdIPv6 shouldn't be a problem, it just causes annoying messages in the log file. I suspect the slow login problems for most people are DNS related. The original problem is caused by name resolution taking longer then 2 minutes to generate a response, no login attempt is made, so ssh hangs up. (Notice the times of the log entries). You can check your DNS like this: 1) Check your current settings Code:
bigmac:/etc root# cat /etc/resolv.confIf the machine is setup via DHCP, this information generally comes from the DHCP server. Any changes you make to the file will probably get overwritten when the machine is restarted. 2) nslookup is a great tool but has been deprecated. Here is an example: Code:
bigmac:/etc root# nslookupHere is an example of the host command: Code:
bigmac:/etc root# host www.google.comHere is an example of the dig command: Code:
bigmac:/etc root# dig www.google.comI am not very strong on OSX, so if I made any errors or if there is an easier way to set something, please correct. |
Thanks for all that info!
If I am finding that the killall isn't working, what should I try next? I also tried kill -9 and the xinetd process survived. I don't want to have to restart. |
Try
Code:
sudo /sbin/service ssh stopCode:
sudo /sbin/service ssh start |
As it turns out, I had to restart the xinetd process by physically accessing my machine. I logged out, and couldn't log back in again. When I looked, there was no xinetd process, thus I had to 'sudo xinetd' and all was well. Not sure what made it crap the bed like that. I am moving the entire system to another drive soon anyway, so I am not going to worry about it.
Thanks again. |
Quote:
|
| All times are GMT -5. The time now is 06:00 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.