Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Tommy_Forrest
Advisor
Jump to solution

Moving machines when you've rebooted one from the SG

When I hop onto an SG and I use the m command to move to another blade and I reboot that blade, I do not get put back to the SMO.

Effectively, this kills the SSH connection (with out it actually being killed).

Back in the day when we used Telnet, there was an escape character you could use to get back into your root session if connectivity got wonky.

There a way to do that when using the "m" command?

Maybe the SMO can realize that the session with the target blade has closed and bring you back to M 1?

I realize there are other commands one could use to reboot another blade.  But it could still be useful for the SMO to figure out what's going on and bring you back (or provide a telnet-esque escape character) if you're working in a blade and it dies or what not.

0 Kudos
1 Solution

Accepted Solutions
Bob_Zimmerman
Authority
Authority

The SSH escape sequence by default is just a tilde. No control. It is only recognized when typed immediately after a newline:

[Expert@LabSC]# ~?
Supported escape sequences:
 ~.   - terminate connection (and any multiplexed sessions)
 ~B   - send a BREAK to the remote system
 ~C   - open a command line
 ~R   - request rekey
 ~V/v - decrease/increase verbosity (LogLevel)
 ~^Z  - suspend ssh
 ~#   - list forwarded connections
 ~&   - background ssh (when waiting for connections to terminate)
 ~?   - this message
 ~~   - send the escape character by typing it twice
(Note that escapes are only recognized immediately after newline.)

So to disconnect, try hitting return-tilde-dot.

View solution in original post

6 Replies
PhoneBoy
Admin
Admin

For SSH, I think it's ctrl ~.
That said, I'm not 100% sure that works for this specific case.

Tommy_Forrest
Advisor

I gave ctrl ~ a try.  No dice.  Also tried ctrl (tilde - doesn't seem like this site likes to render that character correctly).

The session just dies, even after the blade comes back.  You've got no choice but to just close Putty and start over.

0 Kudos
Bob_Zimmerman
Authority
Authority

The SSH escape sequence by default is just a tilde. No control. It is only recognized when typed immediately after a newline:

[Expert@LabSC]# ~?
Supported escape sequences:
 ~.   - terminate connection (and any multiplexed sessions)
 ~B   - send a BREAK to the remote system
 ~C   - open a command line
 ~R   - request rekey
 ~V/v - decrease/increase verbosity (LogLevel)
 ~^Z  - suspend ssh
 ~#   - list forwarded connections
 ~&   - background ssh (when waiting for connections to terminate)
 ~?   - this message
 ~~   - send the escape character by typing it twice
(Note that escapes are only recognized immediately after newline.)

So to disconnect, try hitting return-tilde-dot.

Tommy_Forrest
Advisor

return-tilde-dot = winner, winner chicken dinner!

 

Thanks!

0 Kudos
Bob_Zimmerman
Authority
Authority

Something I forgot to mention: a single tilde goes to the outermost SSH session. Type successive tildes to send the escape sequence to inner sessions. For example, let's say I SSH from my workstation to a jump host, then from the jump host to the destination.

Return-tilde-dot would be caught by the outer SSH session from my workstation to the jump host, and that session will be terminated.

Return-tilde-tilde-dot would be caught by the inner SSH session, from the jump host to the destination, and that is the session which would be terminated.

I don't know of a good way to index in the other direction, so to send commands to the innermost session, you have to remember how many sessions you have outside it. This isn't generally too big a problem, as long chains of SSH connections are fairly rare.

0 Kudos
_Val_
Admin
Admin

@Anatoly can you help?

0 Kudos