Created
July 24, 2016 18:51
-
-
Save jograb/6c8aaf0a237ae0af6bb0b551fff3525f to your computer and use it in GitHub Desktop.
Use a local .bashrc on a remote machine. For example for aliases. // Have to be placed @ .bashrc-file (local) Raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sssh() { | |
name=$USER | |
ssh ${*:1} "cat > /tmp/.bashrc_$name" < ~/.bashrc_remote | |
ssh -t ${*:1} "bash --rcfile /tmp/.bashrc_$name ; rm /tmp/.bashrc_$name" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage: After you've placed the snipped above in your local .bashrc-file you can use it like normal ssh. You just have to replace "ssh" with "sssh" (3 s).
For example "
sssh user@host
"