Answer the question
In order to leave comments, you need to log in
how to reconnect to ssh session?
I connect to host 1 via ssh, from it I also connect via ssh to host 2. The first connection breaks, I reconnect to host 1. There, using ps -a, I see the ssh process. TTY is designated as pts/2. Can I somehow intercept this process and continue to work with host 2 in the same session?
Answer the question
In order to leave comments, you need to log in
How I love dialogues like:
- how to do X?
- if you did Y, then you would not need to do X.
There is reptyr:
Package: reptyr
New: yes
State: not installed
Version: 0.3-2
Priority: optional
Section: misc
Maintainer: Evan Broder <[email protected]>
Architecture: amd64
Uncompressed Size: 67.6 k
Depends: libc6 (>= 2.4)
Description: Tool for moving running programs between ptys
reptyr is a utility for taking an existing running program and attaching it to a new terminal, and is particularly useful for moving a long-running process into a GNU
screen session.
reptyr does a more thorough job of transferring programs than many other tools, including the popular "screenify" shell script, because it changes the program's
controlling terminal. This means that actions such as window resizes and interrupts are sent to the process from the new terminal.
Homepage: https://github.com/nelhage/reptyr
install the screen utility.
sovety.blogspot.com/2008/01/screen.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question