From: unruh on

Since I often work from home where I do
ssh workname
in a shell window
to log onto my work computer, (and have passwordless login set up with
public/private keys) I often find myself doing the same when I
am on my work computer and want to do something like read mail. When I
do
exit
I can often discover myself buried 5 or 6 layers deep (ie I have to hit
exit 5 or 6 times to finally close the window).

Is there any easy way I can find out how deeply I am buried so I can
close all but the last one? Or is there something other than exit which
will take me out of an ssh session, but will not close the shell window
when I get down to the last level?


From: notbob on
Are your eyes brown?

nb
From: J G Miller on
On Thu, 08 Apr 2010 21:30:54 +0000, Unruh asked:

> Since I often work from home where I do ssh workname
> in a shell window
> to log onto my work computer, (and have passwordless login set up with
> public/private keys)

Why do you not do something like

xterm -fg orange -bg black -e slogin my_user_name(a)my_work_computer.bigcorp.com &

I have an alias and Xdefaults files set up plus a shell script so I can just type
slogin user(a)remote and it fires up a new terminal with the remote session and some
"special" colors different from the white on black of local terminal sessions.
From: John Hasler on
Unruh asked:
> Since I often work from home where I do ssh workname in a shell window
> to log onto my work computer, (and have passwordless login set up with
> public/private keys)

Have cosidered using screen?
--
John Hasler
jhasler(a)newsguy.com
Dancing Horse Hill
Elmwood, WI USA
From: Bit Twister on
On Thu, 08 Apr 2010 21:30:54 GMT, unruh wrote:
>
> I can often discover myself buried 5 or 6 layers deep (ie I have to hit
> exit 5 or 6 times to finally close the window).
>
> Is there any easy way I can find out how deeply I am buried so I can
> close all but the last one?

Yes.

click up a terminal

env | sort > x1
bash
env | sort > x2
exit
diff -bBw x1 x2

Maybe a shell level variable will show up.