How to Escape an SSH Session in Linux without Disconnecting

(0 votes, average 0 out of 5)

For those of us who commonly use SSH through the terminal in Linux, it can be extremely useful to want to escape out and work on your local machine for a bit.  Most people think you have to create a new terminal session and that it is not possible to back out of an SSH session once it is connected.  Here's how to do it!

When at the start of a new line, press return.  Next, press the ~ key, which is the escape character in Linux.  Now, hit Ctrl-Z, and your SSH session should have been suspended.  To return, simply type the command 'fg' and press return.  Just like that, you have suspended an SSH session and re-entered it!

Partner Links:
Last Updated on Thursday, 30 September 2010 21:32  
Related Articles

» PHP - Read in a file

The following function demonstrates how to read in a local file with PHP. You must first use the function to open the file handle. This tells PHP where to look to find this file. After that, it is simply a matter of iterating over the file until there are no more lines. The function tests if it has reached the end of the file yet - returning true if it has and false if there is still more to be read. Once we know there is another line to be read in, reads in the line for us into a slot of...

» Search and Replace in Emacs

Searching and replacing in emacs is pretty striaghtforward.  The simplest and easiest way to do a query search and replace is to press M-% (typically this is Alt+Shift+5).  You will be prompted to first enter the search string (the string to replace), and then the replacement string.  Emacs will then begin an iterative search; for each selection, press one of the following:y to accept the replace and continuen to deny the replace and continue!  to automatically replace all...

» Variables in PHP

A variable is a way to store information in may program and scripting languages. In PHP, variables can store things such as strings, integers, floats, boolean, or other objects.To definite and initialize a variable in PHP, you simply use the following form within your code: 1$variable_name = value;When creating a new variable in PHP, you must follow the simple naming conventions below:Variables must start with a letter or underscore ("_").Variables with more than one word should be...