screen -D -R <identifier>

Attach here and now. In detail this means: If a session is running, then reattach. If necessary detach and logout remotely first

Arguments

NameDescription
identifier