fix(ssh): only request TTY if a terminal is connected