- Description: Ensures you are at the beginning of a new line, necessary for the commands to be recognized.
- Usage: Hit the
Enter
key.
- Description: Uses the tilde key as a special escape sequence initiator for SSH.
- Usage: Type the tilde key
~
.
- Description: Completes the escape sequence to terminate the connection.
- Usage: Type the dot
.
.
- Description: Close the current SSH connection, especially useful when the session is stuck or unresponsive.
- Usage: Simply type
~.
on a new line in your SSH session.
- Description: Suspends your SSH session, allowing you to return to your local shell without disconnecting.
- Usage: Type
~^Z
or~CTRL+Z
. Usefg
to resume the session.
- Description: Sends the current SSH session to the background immediately, combining the steps of suspending and then backgrounding the session.
- Usage: Type
~&
after suspending the session.
- Description: Displays a list of all supported escape sequences, providing a quick reference.
- Usage: Type
~?
to see the help menu.
- Description: Shows information about the current SSH tunnel and forwarded connections, useful for debugging or checking the status of port forwarding.
- Usage: Type
~#
during your SSH session.
- Description: Opens a command line to add port forwarding rules dynamically during an active SSH session.
- Usage: Type
~C
and then enter the port forwarding rule.
- Description: Allows you to send a literal
~
at the beginning of a line, useful when~
is part of a command or data. - Usage: Type
~~
when needed.
- Description: Provides verbose output with detailed debug messages about the connection setup and process, invaluable for troubleshooting.
- Usage: Start SSH with the
-v
flag, e.g.,ssh -v user@host
.
- Customizing SSH configurations: Create custom configurations for each host in the
~/.ssh/config
file, including usernames, identities, port numbers, and more. - Using key-based authentication: Enhance security and convenience by using SSH keys instead of passwords, using public-private key cryptography for authentication.
- Multiplexing connections: Utilize SSH's support for connection multiplexing to speed up subsequent connections by reusing a single connection.