I did some monkey patching for exposing ports and it works even further - okay, it automagically logins via ssh now as expected. I can probably send it as is to Github/Gitlab so you have an idea.
Disclaimer: was not considering any edge cases with my changes.