special case ssh connection lag

Posted by Hersheezy on Server Fault See other posts from Server Fault or by Hersheezy
Published on 2011-03-16T23:45:36Z Indexed on 2011/03/17 0:12 UTC
Read the original article Hit count: 495

Filed under:
|

Setup

We have a DMZ and LAN in our office that are connected to the outside with the following setup:

+------+
|      |------> LAN (normal office router)
|Modem |
|      |------> DMZ (a single machine)
+------+

Our internet account is with Comcast and we have 5 status IPs, one of which points to the single machine in the DMZ.

Problem

ssh connections initiated ANYWHERE EXCEPT the office LAN are really fast. However, from the LAN, there is about a 5 second delay. WTF??

Extra info

The DMZ machine is debian 5.

Executing a wget to the DMZ has no lag.

When executing the following, everything up to HERE IS WHERE THE LAG IS INCURRED executes immediately.

ssh -vvvv [email protected]

...
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: Wrote 16 bytes for a total of 1015
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug3: Wrote 48 bytes for a total of 1063
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/shopkins/.ssh/id_rsa (0x22440830)
debug2: key: /home/shopkins/.ssh/identity ((nil))
debug2: key: /home/shopkins/.ssh/id_dsa ((nil))
debug3: Wrote 64 bytes for a total of 1127`


HERE IS WHERE THE LAG IS INCURRED


debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred gssapi-keyex,gssapi-with-mic,gssapi,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/shopkins/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug3: Wrote 368 bytes for a total of 1495
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/shopkins/.ssh/identity
debug3: no such identity: /home/shopkins/.ssh/identity
debug1: Trying private key: /home/shopkins/.ssh/id_dsa
debug3: no such identity: /home/shopkins/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
[email protected]'s password:

© Server Fault or respective owner

Related posts about ssh

Related posts about debian