ssh: Tokens and parameter expansion

Tags: til ssh

ssh provides a number of tokens that will be dynamically replaced in various connection options e.g.:

See more in the man pages: man ssh_config | less '+/^TOKENS'

It also supports referencing local environment variables via ${...} syntax, and since that supports bash expansion there are possibilities for sneaky hacks like: https://blog.jbowen.dev/tips/ssh-tmux/

Published on: 28 Jul 2025