Must be connected to a terminal

Trying to connect to a remote detached screen over SSH? Receiving the Must be connected to a terminal error? If you’ve set your .profile to exec screen -R (as I had) and you’ve got multiple detached sessions (as I had) then you might well be worrying that you’ve locked yourself out (as I was).

Don’t worry.

ssh -t user@host screen -RR

But you might want to fix that .profile