tmux-resurrect icon indicating copy to clipboard operation
tmux-resurrect copied to clipboard

restoring ssh sessions not working

Open ipatch opened this issue 2 years ago • 4 comments

i started tweaking my tmux.conf file yesterday to see if i could restore my ssh sessions after killing my tmux server. this is something i have yet to get working. i'm sure i could be missing something simple but i searched through open and closed issues and only found a handful of issues related to restoring ssh sessions.

i primarily ssh to local computers on my LAN (virtual machines) and i use my $USER/.ssh/config file to setup aliases for logging to such computers.

am i suppose to put the ssh [ALIAS] as the restore command in my tmux.conf or am i missing something else here? or do i just put ssh and tmux-resurrect will pick up / resume (know) which alias the prior ssh session was using?

my tmux.conf below,

https://github.com/ipatch/dotfiles/blob/0cdef7ec4aa9ac054a85f262962bd1f7e6d33f80/terms/tmux/tmux.conf


https://user-images.githubusercontent.com/613805/179624855-416b70ad-da23-464b-84a8-eb7f6353a6e2.mp4


i'm able to provide more information on request, and thank you for making this plugin it has helped me quite a lot.

ipatch avatar Jul 18 '22 22:07 ipatch

updated my tmux.conf to use

set -g @resurrect-processes '~ssh'
set -g @resurrect-processes 'ssh'
set -g @resurrect-processes "git log"
set -g @resurrect-strategy-nvim 'session'

instead of set -g @resurrect-process

and still getting the same results of ssh sessions not restoring.

ipatch avatar Jul 18 '22 22:07 ipatch

seeing the below output, snippet in the last file

pane	freecad_werk	7	:m1	0	:-	0	:/Users/capin	1	fish	:fish
pane	freecad_werk	7	:m1	0	:-	1	:/Users/capin/.ssh	0	fish	:fish
pane	freecad_werk	8	:hbcore	0	:	0	:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula	1	fish	:fish
pane	freecad_werk	8	:hbcore	0	:	1	:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula	0	fish	:fish
pane	jul18_klipper	1	:radio	0	:	0	:/Users/capin/Movies/streams	1	fish	:fish
pane	jul18_klipper	1	:radio	0	:	1	:/Users/capin/Movies/streams/yt.mixes/yt.mix.qos.billie.etc	0	fish	:fish
pane	jul18_klipper	2	:archbox	0	:	0	:/opt/code/repair/hp.laptop.batt	0	fish	:fish
pane	jul18_klipper	2	:archbox	0	:	1	:/opt/code/repair/hp.laptop.batt	1	fish	:fish
pane	jul18_klipper	3	:pi128.printer.cfg	0	:	0	:/Users/capin	0	fish	:fish
pane	jul18_klipper	3	:pi128.printer.cfg	0	:	1	:/Users/capin	1	fish	:fish
pane	jul18_klipper	4	:todos	0	:	0	:/opt/code/github/private/re	1	fish	:fish
pane	jul18_klipper	5	:dots	1	:*	0	:/opt/code/dotfiles	0	nvim	:fish
pane	jul18_klipper	5	:dots	1	:*	1	:/opt/code/dotfiles/terms/tmux/tmux/resurrect	1	ssh	:fish
pane	jul18_klipper	5	:dots	1	:*	2	:/opt/code/dotfiles/terms/tmux/tmux/resurrect	0	fish	:fish
pane	jul18_klipper	5	:dots	1	:*	3	:/opt/code/dotfiles	0	fish	:fish

ipatch avatar Jul 18 '22 22:07 ipatch

have you got it working on your local machine? not over ssh?

sturob avatar Apr 23 '23 20:04 sturob

not sure what i changed, but it's been working for the past couple of months. i run arch on my daily computer now, so not sure if they makes a difference but most if not all ssh sessions restore after loading my previous session.

ipatch avatar Apr 23 '23 20:04 ipatch