Config to have "ssh too-old-host" error out (with chosen message, and sans actual connection attempt)?

Brian Candler b.candler at pobox.com
Mon Jun 30 22:26:00 AEST 2025


On 30/06/2025 12:46, Darren Tucker wrote:
> Its stdout does (since that's its purpose), but its stderr doesn't:

Aside: this doesn't work for me when session sharing options are applied:

------ 8< ------
Host foobar
ProxyCommand sh -c "echo use foo instead >&2"

Host *
   ControlMaster auto
   ControlPersist 2
   ControlPath %d/tmp/ssh_mux_%h_%p_%r
------ 8< -------

% ssh foobar
Connection closed by UNKNOWN port 65535

And yet:

% ssh -v foobar
...
debug1: Local version string SSH-2.0-OpenSSH_9.9
use foo instead
kex_exchange_identification: Connection closed by remote host
Connection closed by UNKNOWN port 65535

I guess this is because the connection handler is being punted off to a 
background process?


More information about the openssh-unix-dev mailing list