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
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.
@Caleb's answer is good, but you could also consider installing a terminal multiplexer like