Difference between revisions of "Ssha function"
Jump to navigation
Jump to search
| Line 13: | Line 13: | ||
| + | == Related == | ||
| + | * [[Autossh]] | ||
== See also == | == See also == | ||
* {{.bash_profile}} | * {{.bash_profile}} | ||
* {{.bash_aliases}} | * {{.bash_aliases}} | ||
Latest revision as of 10:38, 24 July 2026
# Gemini Jul 2026
ssha() {
# Encode local aliases to safely pass over SSH without escaping issues
local local_aliases
local_aliases=$(base64 < ~/.bash_aliases | tr -d '\r\n')
# Connect and load aliases directly into memory using process substitution
ssh -t "$@" "bash --rcfile <(echo '$local_aliases' | base64 -d)"
}
Related[edit]
See also[edit]
Advertising: