Blog | Admin | Archives | Random | Recent | Thanks
    • A grand entrance. Ready for a fantastic night! #albakchan
    • #albakchan the main event
    • Commute
    • Meat, bread, and succotash.

How to Reattach to Screen When `screen -r -d` hangs

Based on an answer on serverfault, but modified to work on linux:

Use this one-liner to get the bash and sshd processes currently hanging onto the old screen.

ps aux | grep $(ps aux | grep [s]creen | grep -o 'pts[^ ]*') | grep 'sshd\|bash'

Kill these processes and screen is recoverable before the long and arbitrary timeout.