How to keep ssh live after reconnect?

146 views
Skip to first unread message

dev.danny

unread,
Mar 19, 2023, 12:40:26 PM3/19/23
to iterm2-discuss

I have a fallback internet connection. If LAN is disconnected, it automatically connects to WIFI immediately.

However, it seems the ssh doesn't try to connect again on iterm2.
So, my node program on the server is not running properly.

In vscode, it connects automatically even though the LAN is disconnected and Wifi is connected and I can see my node program is running.

Does anyone know how to set up on iterm2?

dev.danny

unread,
Mar 19, 2023, 2:35:29 PM3/19/23
to iterm2-discuss
I found a solution by using mosh.

George Nachman

unread,
Mar 31, 2023, 2:12:48 PM3/31/23
to iterm2-...@googlegroups.com
Mosh is good, although it can lose some history. Personally, I like a combination of the tmux integration and Eternal Terminal. More details here: https://gitlab.com/gnachman/iterm2/-/wikis/tmux-Integration-Best-Practices#i-keep-having-to-reattach-because-my-ssh-connection-dies-when-my-ip-address-changes

--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iterm2-discuss/b1b630e4-fac8-478d-ae53-d4dfebbe54d6n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages