4 ms·
Show HN: Make your dotfiles follow you automatically when you ssh to a server
- mooism2 14y agoInstead of writing a shell script, would adding this to your ~/.ssh/config work? PermitLocalCommand yes LocalCommand tar c -C${HOME} .oh-my-zsh .zshrc .vim .vimrc .tmux.conf | ssh -o PermitLocalCommand=no %n "tar mx -C${HOME} ; chsh -s /bin/zsh" You could also use the ControlMaster and ControlPath directives to ensure only a single ssh handshake is made. (Having said that, I get my dotfiles to follow me by keeping my home directory in mercurial.)