I'm using cygwin. and use it with ssh to login into a ubuntu server. sometimes, I want to switch back to my cygwin and then quickly switch to ubuntu shell. How to do this?
You can background the ssh client just like any other shell job by sending it a signal and returning to the parent shell. Since the ssh client traps most key strokes, it would grab the normal shell job control keystrokes, but you can get its attention and get through to the shell using an escape sequence. For most ssh-clients this involves sending a
~ that has been directly preceded by a newline. The following sequence should do the job:
Enter ~ Ctrl+Z
After it is suspended you can continue using the local shell. When you want to go back to the suspended job, just run the
For further reading, look up Bash Job Control.