π SSH tips
internet internet security
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