[ale] Q: Out of the Nest: ending bottom SSH session (ASCII Art Alert)

John Mills johnmills at speakeasy.net
Thu Dec 11 12:20:07 EST 2008


Mike -

Thanks for the help.

On Thu, 11 Dec 2008, Michael H. Warfield wrote:

> On Thu, 2008-12-11 at 10:31 -0500, John Mills wrote:

>> I frequently open an SSH console from one Linux host to another, then from
>> the second to a third:

  >>    +-------+ SSH     (SSH) +-------+ SSH +---+
  >>    | larry |---->[FW]----->| curly |---->|moe|
  >>    +-------+               +-------+     +---+

  ...
>> My problem is that an 'exit' call from my console (supposedly on 'moe') is
>> intercepted and actually closes the top-level session on 'larry'. My exit
>> (or recovery) procedure thus becomes:
   [long and awkward!]

> 	You quoted 'exit'.  That immediately raises the question of "how did
> you exit" since there are several ways.

> 	Literally typing "exit" or ^D should exit the shell on moe and leave
> you on curly which may thing exit itself or continue doing what every
> you have defined there.

I literally type 'exit' but it doesn't behave as you (or I) expect. In my 
setup it breaks the connection from 'larry' to 'curly' but leaves the 
connection from 'curly' to 'moe' running. Not optimal! I'll play with '^D' 
and the '~' escapes and see how they behave.

I could also define on 'moe' a unique alias - or a trivial script - to 
'exit'. That should get to the right host before being interpreted. 
Inelegant, but perfectly usable.

  - John


More information about the Ale mailing list