Try a few more possibilities with SSH_PTY controlling the ssh.pty setting