E.g. when I SSH into a server and then
sudo bash and then
su <user> to do some work, I want a quick way to exit all shells back to my local terminal.
When I have to do some work on a server as jim.
local > ssh me@server server:me > sudo bash server:root > su jim server:jim > // do stuff as jim
When my work is complete but I don't want to leave the shells logged in.
server:jim > exit server:root > exit server:me > exit local > // after 3 commands
preferred way out
Here's how I'd like to do it.
server:jim > exitall // for example local > // after one command