How could I debug sshd taking several minutes to start?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I use a VM with ssh and X forwarding to run certain applications. When launching the VirtualBox VM, it takes several minutes for ssh to come online, even though the machine is at the desktop environment's login prompt in no time. The machine does not use a lot of resources (CPU, network) while sshd is starting.



Other things that might need to understand the issue:



  • The host is a Debian Buster (testing) system running OpenSSH_7.9p1 Debian-1, OpenSSL 1.1.1 11 Sep 2018

  • When I log in on the desktop environment, it also takes a bit, but usually not multiple minutes. It accepts my login (or tells me I typo'd) immediately and switches to a blank screen, but takes a while to show the actual desktop.

  • Once the desktop is shown and I can start to debug the issue, the issue has disappeared: sshd invariably works when the desktop environment has loaded. They both seem to block on the same thing.

  • While sshd is not yet up, the system responds with "connection refused", i.e. it can reach the host and port, but sshd seems not to have bound to it.

  • I can also ping the host, immediately from the moment the boot screen changes to the desktop environment's login prompt. The system seems fully ready, except sshd does not start (or bind to the interface).

Switching to a virtual terminal does not work because it switches to a virtual terminal of my host system, even if set the keyboard to be captured. I could prevent the desktop env from booting and get a terminal immediately, but I only have a short amount of time (2-3 minutes I'd say) so I would have to reboot after every few commands or know where to look in order to figure it out.



How could I debug this issue effectively? Is there a likely cause that I could check?










share|improve this question























  • maybe dns resolve error.
    – Ipor Sircer
    Nov 22 at 9:29










  • @IporSircer I was thinking DNS might be it, but what could I do to fix it? Resolvconf seems to work correctly as, after booting, dns works fine.
    – Luc
    Nov 22 at 9:50














up vote
0
down vote

favorite












I use a VM with ssh and X forwarding to run certain applications. When launching the VirtualBox VM, it takes several minutes for ssh to come online, even though the machine is at the desktop environment's login prompt in no time. The machine does not use a lot of resources (CPU, network) while sshd is starting.



Other things that might need to understand the issue:



  • The host is a Debian Buster (testing) system running OpenSSH_7.9p1 Debian-1, OpenSSL 1.1.1 11 Sep 2018

  • When I log in on the desktop environment, it also takes a bit, but usually not multiple minutes. It accepts my login (or tells me I typo'd) immediately and switches to a blank screen, but takes a while to show the actual desktop.

  • Once the desktop is shown and I can start to debug the issue, the issue has disappeared: sshd invariably works when the desktop environment has loaded. They both seem to block on the same thing.

  • While sshd is not yet up, the system responds with "connection refused", i.e. it can reach the host and port, but sshd seems not to have bound to it.

  • I can also ping the host, immediately from the moment the boot screen changes to the desktop environment's login prompt. The system seems fully ready, except sshd does not start (or bind to the interface).

Switching to a virtual terminal does not work because it switches to a virtual terminal of my host system, even if set the keyboard to be captured. I could prevent the desktop env from booting and get a terminal immediately, but I only have a short amount of time (2-3 minutes I'd say) so I would have to reboot after every few commands or know where to look in order to figure it out.



How could I debug this issue effectively? Is there a likely cause that I could check?










share|improve this question























  • maybe dns resolve error.
    – Ipor Sircer
    Nov 22 at 9:29










  • @IporSircer I was thinking DNS might be it, but what could I do to fix it? Resolvconf seems to work correctly as, after booting, dns works fine.
    – Luc
    Nov 22 at 9:50












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I use a VM with ssh and X forwarding to run certain applications. When launching the VirtualBox VM, it takes several minutes for ssh to come online, even though the machine is at the desktop environment's login prompt in no time. The machine does not use a lot of resources (CPU, network) while sshd is starting.



Other things that might need to understand the issue:



  • The host is a Debian Buster (testing) system running OpenSSH_7.9p1 Debian-1, OpenSSL 1.1.1 11 Sep 2018

  • When I log in on the desktop environment, it also takes a bit, but usually not multiple minutes. It accepts my login (or tells me I typo'd) immediately and switches to a blank screen, but takes a while to show the actual desktop.

  • Once the desktop is shown and I can start to debug the issue, the issue has disappeared: sshd invariably works when the desktop environment has loaded. They both seem to block on the same thing.

  • While sshd is not yet up, the system responds with "connection refused", i.e. it can reach the host and port, but sshd seems not to have bound to it.

  • I can also ping the host, immediately from the moment the boot screen changes to the desktop environment's login prompt. The system seems fully ready, except sshd does not start (or bind to the interface).

Switching to a virtual terminal does not work because it switches to a virtual terminal of my host system, even if set the keyboard to be captured. I could prevent the desktop env from booting and get a terminal immediately, but I only have a short amount of time (2-3 minutes I'd say) so I would have to reboot after every few commands or know where to look in order to figure it out.



How could I debug this issue effectively? Is there a likely cause that I could check?










share|improve this question















I use a VM with ssh and X forwarding to run certain applications. When launching the VirtualBox VM, it takes several minutes for ssh to come online, even though the machine is at the desktop environment's login prompt in no time. The machine does not use a lot of resources (CPU, network) while sshd is starting.



Other things that might need to understand the issue:



  • The host is a Debian Buster (testing) system running OpenSSH_7.9p1 Debian-1, OpenSSL 1.1.1 11 Sep 2018

  • When I log in on the desktop environment, it also takes a bit, but usually not multiple minutes. It accepts my login (or tells me I typo'd) immediately and switches to a blank screen, but takes a while to show the actual desktop.

  • Once the desktop is shown and I can start to debug the issue, the issue has disappeared: sshd invariably works when the desktop environment has loaded. They both seem to block on the same thing.

  • While sshd is not yet up, the system responds with "connection refused", i.e. it can reach the host and port, but sshd seems not to have bound to it.

  • I can also ping the host, immediately from the moment the boot screen changes to the desktop environment's login prompt. The system seems fully ready, except sshd does not start (or bind to the interface).

Switching to a virtual terminal does not work because it switches to a virtual terminal of my host system, even if set the keyboard to be captured. I could prevent the desktop env from booting and get a terminal immediately, but I only have a short amount of time (2-3 minutes I'd say) so I would have to reboot after every few commands or know where to look in order to figure it out.



How could I debug this issue effectively? Is there a likely cause that I could check?







networking boot virtualbox openssh sshd






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 24 at 18:48









Rui F Ribeiro

38.3k1475126




38.3k1475126










asked Nov 22 at 9:21









Luc

883717




883717











  • maybe dns resolve error.
    – Ipor Sircer
    Nov 22 at 9:29










  • @IporSircer I was thinking DNS might be it, but what could I do to fix it? Resolvconf seems to work correctly as, after booting, dns works fine.
    – Luc
    Nov 22 at 9:50
















  • maybe dns resolve error.
    – Ipor Sircer
    Nov 22 at 9:29










  • @IporSircer I was thinking DNS might be it, but what could I do to fix it? Resolvconf seems to work correctly as, after booting, dns works fine.
    – Luc
    Nov 22 at 9:50















maybe dns resolve error.
– Ipor Sircer
Nov 22 at 9:29




maybe dns resolve error.
– Ipor Sircer
Nov 22 at 9:29












@IporSircer I was thinking DNS might be it, but what could I do to fix it? Resolvconf seems to work correctly as, after booting, dns works fine.
– Luc
Nov 22 at 9:50




@IporSircer I was thinking DNS might be it, but what could I do to fix it? Resolvconf seems to work correctly as, after booting, dns works fine.
– Luc
Nov 22 at 9:50















active

oldest

votes











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f483392%2fhow-could-i-debug-sshd-taking-several-minutes-to-start%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f483392%2fhow-could-i-debug-sshd-taking-several-minutes-to-start%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay