Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.