Build hangs due to an unexpected SSH prompt

Hello,

I am seeing my Travis build getting timed out for some reason my regression test in middle is trying to connect to some host which doesn’t make sense i get a message which you generally see with ssh host key issue. This is quite weird because i checked the regression test and there are no attempts to make any connection, it has nothing to do with ssh.

ECDSA key fingerprint is SHA256:ybHdNwh/u0cRmdfvi1CSB3pQ0OTmI7KEvr81/PE+q2U.
Are you sure you want to continue connecting (yes/no)?

The Travis build can be found at https://travis-ci.com/github/buildtesters/buildtest/jobs/402740111
I have my last working Travis build see https://travis-ci.com/github/buildtesters/buildtest/jobs/396600530 there are not many difference almost none. I am quite unsure what’s the deal, i dont know if i need setup ssh known host i found an article in https://docs.travis-ci.com/user/ssh-known-hosts/ to set this up. Clearly the issue is its expecting a user response in middle of regression test. I can confirm these tests work in Github workflow see https://github.com/buildtesters/buildtest/actions/runs/318523827

Your help would be appreciated.

Look closely into what’s happening in that test. Something is definitely calling ssh 127.0.0.1 and only you know what your code does.
E.g. it can be calling some external command that is overridden in Travis.
You can request debug mode for your repo to diagnose things interactively.

It does seem that you are testing localhost. You should examine your tests.

So i think the issue is either

  1. Shouldn’t 127.0.0.1 be part of known host on build system it’s set for any Linux machine.
    The test are expected to run on local machine in this case Travis.

If not should i set localhost in travis configuration https://docs.travis-ci.com/user/ssh-known-hosts/

  1. The debug mode is requires permission from admin, on per repo, this button is not available. Can you enable it for repo https://travis-ci.com/github/buildtesters/buildtest/

It’s not on a fresh openssh-server install. So I guess that’s not something you can take for granted.

That alone would probably not work. You’ll likely need to add stuff to authorized_keys as well.