Ultimately, whoever came up with the idea that shell sessions should auto-logout after 15 minutes should rethink their life. That's also a bit annoying, but less so than losing scrollback.Īccordingly, this should probably not be the default. PuTTY will show a non-warning "connection closed by remote host" popup. Not to mention this would be specific to PuTTY, but the reconnect dialog is used by all plugins.įinally, setting this to never also keeps the window open when actively, cleanly logging out. That dialog only comes up after the PuTTY window has already been destroyed, so you can't really have both at the same time. Ideally, RoyalTS's own reconnect dialog would use (implicitly, or as an option) PuTTY's reconnect feature, but that has been discussed a bunch of times already. A much sought-after feature, if forum threads are any indicator. A disconnected-but-not-closed PuTTY window can be reconnected using PuTTY's own reconnection feature, which maintains the scrollback. The reverse is true as well, and the reason for my question. It's not necessarily ideal to implicitly connect the two. That will force the SSH connection to be a background job.It depends, the RoyalTS reconnect dialog offers a few things that a disconnected-but-not-closed PuTTY window does not. One other thing, if you want your SSH to just run your commands and immediately exit - that is, you don't want a remote terminal session - you can use the -f option to ssh. (Note that escapes are only recognized immediately after newline.) ~~ - send the escape character by typing it twice Thats easier, use option -e on the ssh command line. Option 2: Change the escape character that ssh uses. which reminds me that some screen default configurations still close the session when closing the terminal. type control A d (control/A followed by d) to detach. It may take some effort to find another rarely-used character, like backslash or vertical bar or backquote. I usually use screen, which uses fewer keystrokes than tmux. Its the variable 'escape' in the cu configuration file. ~& - background ssh (when waiting for connections to terminate) Option 1: Change the escape character that cu uses. terminate connection (and any multiplexed sessions) Good luck hunting!īy the way, some of the other escape sequences offered by OpenSSH clients may also be useful: Supported escape sequences: bashrc, etc.) may have something in it that establishes a session. Or your remote machine's terminal configs like. It could be that your script is opening sessions that you didn't realize. Have a look at the connections that are still active on your hung SSH session by typing ~# in your hung SSH terminal. By background connections, I mean things such as: Typically, SSH terminal sessions hang if there are still background connections still open. Nohup bin/kafka-server-start.sh config/server.properties & Update: When executing line by line, two commands don't return to shell without hitting CR: nohup bin/zookeeper-server-start.sh config/zookeeper.properties & Update: I now manually disown these processes. How can I run these services and still have an ssh session that ends? + Running nohup bin/kafka-server-start.sh config/server.properties 2>&1 > /dev/null & I run this: ssh -t -vvv -i ~/.ssh/druid-keypair -o StrictHostKe圜hecking=no &1 > /dev/null &
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |