How do I force detach Screen from another SSH session?

T. Brian Jones

I had Screen running inside an SSH session. Terminal froze. After restarting Terminal, that Screen session still thinks it's attached. Maybe it is. Perhaps I don't really know what that means.

I'd like to attach to that Screen session from a fresh SSH login. I do not want to kill that Screen session as important things are happening over there. : )

The options I think I have ( none of which I know how to solve ):

  • How do I detach that Screen session?
  • How do I kill the SSH session that that Screen session is attached to?
Matt S.

As Jose answered, screen -d -r should do the trick. This is a combination of two commands, as taken from the man page.

screen -d detaches the already-running screen session, and screen -r reattaches the existing session. By running screen -d -r, you force screen to detach it and then resume the session.

If you use the capital -D -RR, I quote the man page because it's too good to pass up.

Attach here and now. Whatever that means, just do it.

Note: It is always a good idea to check the status of your sessions by means of "screen -list".

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How do I detach a screen session from a terminal?

From Dev

How to remotely detach a screen from another terminal

From Dev

How do you detach the 2nd screen from within another screen?

From Dev

how can i force screen to detach *instead of* exit/logout?

From Dev

how can i force screen to detach *instead of* exit/logout?

From Dev

How do I detach JProfiler from Eclipse?

From Dev

How do i detach this fan from the heatsink?

From Dev

Detach from screen session inside bash script

From Dev

How do I detach, then re-attach to a kvm spice session?

From Dev

How can I detach a gdb session from outside?

From Dev

Detach from tmux session and close ssh session with 1 command

From Dev

How do I store information from methods to be used in another session?

From Dev

How do I detach from a controlling terminal from the command line?

From Dev

alias to detach screen when I exit (and kill ssh)

From Dev

Detach from screen without Ctrl+a d in SSH

From Dev

How to detach ssh session without killing a running process?

From Dev

How do I force a breakpoint from .gdbinit?

From Dev

How can I resume a screen that I did not manage to detach?

From Dev

How do I kill a screen session if it has no running processes?

From Dev

Starting a screen session from within another screen session

From Dev

How do I use a variable from one session (a Powershell ISE tab) in another?

From Dev

How do I save m2m field session from a form to another?

From Dev

How do I display a summary of items in a cart from a $_SESSION onto another page

From Dev

How do I log history in a tramp emacs ssh session

From Dev

How do I ring a bell sound within an ssh session?

From Dev

How do I recover/kill an SSH session after losing connection?

From Dev

Pass my credentials from a ssh session to another ssh session

From Dev

How do I remove a value from Session?

From Dev

How to scroll inside a screen session of an ssh connection?

Related Related

  1. 1

    How do I detach a screen session from a terminal?

  2. 2

    How to remotely detach a screen from another terminal

  3. 3

    How do you detach the 2nd screen from within another screen?

  4. 4

    how can i force screen to detach *instead of* exit/logout?

  5. 5

    how can i force screen to detach *instead of* exit/logout?

  6. 6

    How do I detach JProfiler from Eclipse?

  7. 7

    How do i detach this fan from the heatsink?

  8. 8

    Detach from screen session inside bash script

  9. 9

    How do I detach, then re-attach to a kvm spice session?

  10. 10

    How can I detach a gdb session from outside?

  11. 11

    Detach from tmux session and close ssh session with 1 command

  12. 12

    How do I store information from methods to be used in another session?

  13. 13

    How do I detach from a controlling terminal from the command line?

  14. 14

    alias to detach screen when I exit (and kill ssh)

  15. 15

    Detach from screen without Ctrl+a d in SSH

  16. 16

    How to detach ssh session without killing a running process?

  17. 17

    How do I force a breakpoint from .gdbinit?

  18. 18

    How can I resume a screen that I did not manage to detach?

  19. 19

    How do I kill a screen session if it has no running processes?

  20. 20

    Starting a screen session from within another screen session

  21. 21

    How do I use a variable from one session (a Powershell ISE tab) in another?

  22. 22

    How do I save m2m field session from a form to another?

  23. 23

    How do I display a summary of items in a cart from a $_SESSION onto another page

  24. 24

    How do I log history in a tramp emacs ssh session

  25. 25

    How do I ring a bell sound within an ssh session?

  26. 26

    How do I recover/kill an SSH session after losing connection?

  27. 27

    Pass my credentials from a ssh session to another ssh session

  28. 28

    How do I remove a value from Session?

  29. 29

    How to scroll inside a screen session of an ssh connection?

HotTag

Archive