Start your ssh session normally.
Within the ssh session use an escape sequence (
Z to suspend it:
Enter ~ Ctrl + Z
Ctrl + Z just suspends a process, while the escape sequence is required to get through to the shell, since we’re operating from within the remote server environment.
Return to the ssh session with the
fg command. For further reading, look up Bash Job Control.
Tags: linux command line, bash, multiple sessions