Something like getting SSH to support SRV records would allow that to be transparent to the user: https://github.com/Crosse/sshsrv