Sshs

From wikieduonline
Revision as of 08:04, 7 February 2023 by Brave (talk | contribs) (Created page with " # Wrapper for ssh to automatically source bash config file on remote machine. # Sources ~/.bashrc_remote # # author Jonah Dahlquist # license CC0 sshs() {...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


# Wrapper for ssh to automatically source bash config file on remote machine.
# Sources ~/.bashrc_remote
#
# author Jonah Dahlquist
# license CC0 

sshs() {
        ssh ${*:1} "cat > /tmp/.bashrc_temp" < ~/.bashrc_remote
        ssh -t ${*:1} "bash --rcfile /tmp/.bashrc_temp ; rm /tmp/.bashrc_temp"
}

Advertising: