Move the ssh_runner muxer code to a function