πŸ”’ SSH tips

internet internet security

Written on September 7, 2022

Some good tips for 2022 (like connecting straight into tmux)! #TIL

SSH straight into tmux

~/.ssh/config:

Host example.org
	RemoteCommand tmux new -A -s default

enter tilda dot

BOOM

MatthiasPortzel β€œEnter” then ~ then . will kill a hung SSH connection, instead of having to close the terminal tab. I use it all the time but most people haven’t heard of it.

glandium Related: β€œEnter” then ~ then β€œC” will open a command prompt that allows to add/close port forwardings. There others. Try β€œEnter” then ~ then β€œ?”. blueflow Documented in ssh(1), section β€œESCAPE CHARACTERS”.

# user@machine:~ $   
# user@machine:~ $ ~?
Supported escape sequences:
 ~.   - terminate connection (and any multiplexed sessions)
 ~B   - send a BREAK to the remote system
 ~C   - open a command line
 ~R   - request rekey
 ~V/v - decrease/increase verbosity (LogLevel)
 ~^Z  - suspend ssh
 ~#   - list forwarded connections
 ~&   - background ssh (when waiting for connections to terminate)
 ~?   - this message
 ~~   - send the escape character by typing it twice
(Note that escapes are only recognized immediately after newline.)

Key etc, TOFU !?

https://smallstep.com/blog/use-ssh-certificates/

https://mosh.org

Some references / Go further / reason of this post!



β—€ Why using TLSπŸ”’ (in 2022) β–  β–  β–  Lazy docker! β–Ά


In the same category: