3 ms·
Instead 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
by mooism2 14y ago
Instead 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.)