Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A possible fix for slow SSH connections' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A possible fix for slow SSH connections
Authored by: Lido on Mar 31, '05 02:10:35PM

I just asked my friend to login to my server from his mac and he can do it fine, so it's not something to do with reverse dns (unless somehow he turned his checking off on his mac). This problem seems to be isolated to my mac trying to ssh to a specific server.

---
-Lido



[ Reply to This | # ]
A possible fix for slow SSH connections
Authored by: ghinteclinn on Mar 31, '05 03:00:51PM

Then most probably one of the two nodes, your machine or the remote machine, is not configured to do name lookups correctly. A common mistake is not including relevant domains in the resolver search lists.



[ Reply to This | # ]
A possible fix for slow SSH connections
Authored by: Lido on Mar 31, '05 05:25:14PM

On my machine I can connect to other servers so I don't understand what would screw this one up. Also, other people can connect to the server that's giving me trouble (including me if I ssh through another server).

I don't see why I need to add anything to any config file to ssh connect somewhere. I thought it was like using a browser. Tell terminal the username and server you want to connect to and it tries. It shouldnt need to know anything beyond that should it?

---
-Lido



[ Reply to This | # ]
A possible fix for slow SSH connections
Authored by: ghinteclinn on Mar 31, '05 05:46:29PM

Yes, it should. Look under "spoofing attacks" and ways to prevent them. Checking DNS records is a common first step in spotting a spoof attempt.



[ Reply to This | # ]
A possible fix for slow SSH connections
Authored by: rprestonatmitre on Mar 31, '05 05:54:45PM
This may help, found in man ssh(1):
ssh automatically maintains and checks a database containing identifications for all hosts it has ever been used with. Host keys are stored in $HOME/.ssh/known_hosts in the user's home directory. Additionally, the file /etc/ssh_known_hosts is automatically checked for known hosts. Any new hosts are automatically added to the user's file. If a host's identification ever changes, ssh warns about this and disables password authentication to prevent a trojan horse from getting the user's password.
Perhaps deleting the entry for the machine you're trying to connect to will help.



[ Reply to This | # ]

A possible fix for slow SSH connections
Authored by: Lido on Mar 31, '05 07:04:39PM

What's weird is that added the server name and ip address to /etc/hosts and that fixed the problem. Then I read your post about /known_hosts and commented out the line I'd added to /etc/hosts and deleted the line in known_hosts related to my server. It also worked. The solution is as baffling as the problem.

---
-Lido



[ Reply to This | # ]
A possible fix for slow SSH connections
Authored by: grumpy on Mar 31, '05 05:16:59PM

I had the problem originally described as well and came up with the same solution some time back.

Worth noting though is that of two machines I have, the 10.2.8 machine has always worked okay. The 10.3.X machine did work but then stopped working at one point when one of the updates for 10.3 was applied. Both these machines are on a home network behind a ADSL modem with firewall. I already tried the various suggestions about fiddling with the sshd options and none worked that I could find. The only thing that worked was the hosts file entry.

If I go onto a totally different BSD system on the Internet and go to the same target machine, it has no problem at all.



[ Reply to This | # ]