ssh over stunnel hangs on second connection

Andrew Schulman andrex.e.schulman@gmail.com
Sat Feb 17 19:55:58 GMT 2024


>  > 
>  > But supposing you keep your current configuration. Can you please clarify how
>  > you're invoking stunnel? Do you have a ProxyCommand directive in your
>  > .ssh/config, like:
>  > 
>  > ProxyCommand /usr/bin/stunnel stunnel.conf
> 
> No... I just ssh to 'localhost' on the port that per stunnel.conf is
> listening for client connections.
> This works fine in Ubuntu and has worked fine for me before on
> Win7/Win10.
> 
> I don't use any fixed ProxyCommand to invoke stunnel because the vast
> majority of the time I just use straight SSH -- I only use 'stunnel'
> when SSH is blocked.

OK. So why that worked before and it doesn't work now, I don't know. But what
that sounds like to me is that you have only one stunnel process. When you
reproduce the problem, how many stunnel processes are running?

ps | grep stunnel

The advantage of using ProxyCommand in your ssh config is that it starts a
separate stunnel process for each connection, which should avoid this problem.

If you don't usually need stunnel, you can create one two ssh configurations
with different names, one with ProxyCommand and one without, and use whichever
one you need.

Andrew



More information about the Cygwin mailing list