Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone have an idea or hack on how to source my local dotfiles (I will probably need more of them so this solution should work with many files) on remote machines without scp them to remote machine?

Is something like scp .bashrc to /tmp folder on remote machine and then exporting BASHRC env variable the best solution?

I need this because of our company policy and fast cloud servers deployment and redeployment and I don't want to touch .bashrc files on remote machine so my colleges are able to use their default env which doesn't suit me.

share|improve this question

You can ssh to the remote machine upon which you can execute your local script on the remote machine.

ssh <remote machine ip> "/bin/sh -s" <  local_script_file
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.