Jump to content

ssh takes a long time to connect after being idle for a long time


Recommended Posts

after i disconnect from ssh of opiz and wait a few hours, after trying to connect nothing happens for ~10 seconds (no network packets from opiz), but after waiting it starts responding and then it works fine until i disconnect and wait again.

this is present on opiz in debian armbian 08.23, 11.23, bleeding edge build from yesterday. this is not present on opi pc+ in build 11.23. this doesn't affect any other network services, only affects ssh.

Edited by 0ka
Link to comment
Share on other sites

Hi @0ka,

I have seen this behaviour in SSH when UseDNS is set to yes, and there are DNS issues. The behaviour is essentially a hang during initial login as it attempts to reverse DNS the client's IP. This will then work for a period (because the response is cached) and then be slow again after the local DNS cache expires.

A test would be to set UseDNS to no in the sshd_config, restart SSH and see if the issue still exists?
 

If changing UseDNS resolves it, I would double check DNS configuration and network connectivity to the DNS servers it has configured.

 

Sorry, can't comment on why this may have changed between images.

Edited by pixdrift
Link to comment
Share on other sites

There is not enough information to debug your issue. Please share the following

  • Device name that you are having the issue with. Do not abbreviate the device name it will only cause confusion
  • How are you connected to the network, ethernet or wifi? Any firewall rules defined on the device or router/switch? Any other thing related to your setup that can be a variable in this scenario?
  • Any other modifications on the device or is it just a clean install?
  • Can you share the logs from your device?
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines