ssh very slow

I'm facing a problem when trying to ssh to SUN servers with solaris OS,it takes a long time until prompted for password ..after connecting to the server everything work fine..how can I solve this issue???

looks like a dns or other nameservice problem. do you connect with name or ip?

I have seen this many times, and I agree its a DNS issue.

I connect using the IP address not NAME , what did you mean by DNS problem ???

Try setting "UseDNS no" in /etc/ssh/sshd_config

and don't forget to restart the sshd after changing the config! :wink:

Are you using any name service for authentication on the client, NIS LDAP, or is it all local files? Grep passwd /etc/nsswitch.conf
if you are using a name service, ensure you have the name service server in your /etc/hosts file.

There are a few things which can cause this, all of which have the same initial response delay when connecting.

  1. DNS (on the system you are connecting to) as already mentioned, use of the ipaddress does not preclude this possibility, because if UseDns is set the server will attempt to lookup the client before allowing the connection.

  2. Netmasks. If the netmask is incorrect on the server or client it will take some time to figure out the correct routing.

  3. Network autonegotiation issue, if one or other party ends up half-duplex you will see similar problems.

Hi mm,

Have you tried the suggested steps? Please try and let us know the result.

Hello Ikon,

I tried to find "UseDNS" inside sshd_config file but I couldnt find it??!!

thnx

Use:

VerifyReverseMapping

instead, it does the same thing.

Guys ..are you talking about sshd_config file??? ,it doesnt contain this "usedns" verifyreversemapping