Skip to contentSkip to conversation

SSH Login Delay

DISCUSSION Jack Mitchell 2 participants 3 messages Jan 21, 2013

lore
Share & tools
lore
#0 lore raw

I have recently noticed that when SSH'ing to my BeagleBone it has a 3-5 second delay before the bash prompt shows. I have looked in /var/log/messages and noticed:

Jan 18 15:47:12 beaglebone auth.info sshd[12389]: Accepted none for root from 192.168.0.51 port 37905 ssh2
Jan 18 15:47:12 beaglebone auth.info sshd[12399]: lastlog_openseek: Couldn't stat /var/log/lastlog: No such file or directory
Jan 18 15:47:12 beaglebone auth.info sshd[12399]: lastlog_openseek: Couldn't stat /var/log/lastlog: No such file or directory

I was wondering if these stat commands had a timeout on them and therefore causing the delay. If so, why do these logs not exist?

I have also noticed that avahi has crept into my image recently and if it was possibly something to do with dns resolution or similar?

Has anyone else noticed issues or is a problem with my specific build?

I am running near HEAD oe-core master with a custom distro based on Poky.

Regards,
Jack.

Signature · 5 lines
  Jack Mitchell ([email protected])
  Embedded Systems Engineer
  http://www.embed.me.uk

--
#1 lore raw
Quoted 9 lines · Jack Mitchell

I have recently noticed that when SSH'ing to my BeagleBone it has a 3-5 second delay before the bash prompt shows. I have looked in /var/log/messages and noticed:

Jan 18 15:47:12 beaglebone auth.info sshd[12389]: Accepted none for root
from 192.168.0.51 port 37905 ssh2
Jan 18 15:47:12 beaglebone auth.info sshd[12399]: lastlog_openseek:
Couldn't stat /var/log/lastlog: No such file or directory
Jan 18 15:47:12 beaglebone auth.info sshd[12399]: lastlog_openseek:
Quoted 7 lines

Couldn't stat /var/log/lastlog: No such file or directory

I was wondering if these stat commands had a timeout on them and therefore causing the delay. If so, why do these logs not exist?

I have also noticed that avahi has crept into my image recently and if it was possibly something to do with dns resolution or similar?

In my experience this is most likely due to DNS resolution timing out trying to resolve a LAN IP address.

Try editing the sshd_config on your BeagleBone's filesystem and set UseDNS to no. See if that helps.

Scott

Signature · 3 lines
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center
#2 lore raw
Quoted 15 lines · Scott Garman
Quoted 14 lines · Jack Mitchell

I have recently noticed that when SSH'ing to my BeagleBone it has a 3-5 second delay before the bash prompt shows. I have looked in /var/log/messages and noticed:

Jan 18 15:47:12 beaglebone auth.info sshd[12389]: Accepted none for root
from 192.168.0.51 port 37905 ssh2
Jan 18 15:47:12 beaglebone auth.info sshd[12399]: lastlog_openseek:
Couldn't stat /var/log/lastlog: No such file or directory
Jan 18 15:47:12 beaglebone auth.info sshd[12399]: lastlog_openseek:

Couldn't stat /var/log/lastlog: No such file or directory

I was wondering if these stat commands had a timeout on them and therefore causing the delay. If so, why do these logs not exist?

Quoted 9 lines
Quoted 2 lines

I have also noticed that avahi has crept into my image recently and if it was possibly something to do with dns resolution or similar?

In my experience this is most likely due to DNS resolution timing out trying to resolve a LAN IP address.

Try editing the sshd_config on your BeagleBone's filesystem and set UseDNS to no. See if that helps.

Scott

Perfect, fixed it straight away, thanks!

Signature · 5 lines
  Jack Mitchell ([email protected])
  Embedded Systems Engineer
  http://www.embed.me.uk

--