Last active
January 18, 2023 19:48
-
-
Save jonahbron/5549848 to your computer and use it in GitHub Desktop.
Wrapper for ssh that allows you to automatically source your own .bashrc when logging-in to another computer. Place in your .bashrc file to use.
This file contains hidden or 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
# 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" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment