Quote:
Originally Posted by allend
heh. Maybe not.
Personally, I just accept the default and do not futz. Maintaining personal preferences across multiple systems is too much of a chore.
|
The best tip I've come across for maintaining personal preferences across multiple systems is below.
https://news.ycombinator.com/item?id=32468605
hoechst 1 hour ago | next [–]
Not really a script, but a `.ssh/config` to automatically deploy parts of my local cli environment to every server i connect to (if username and ip/hostname matches my rules). On first connect to a server, this sync all the dotfiles i want to a remote host and on subsequent connects, it updates the dotfiles. Idk if this is "special", but I haven't seen anyone else do this really and it beats for example ansible playbooks by being dead simple.
Code:
Match Host 192.168.123.*,another-example.org,*.example.com
User myusername,myotherusername
ForwardAgent yes
PermitLocalCommand yes
LocalCommand rsync -L --exclude .netrwhist \
--exclude .git \
--exclude .config/iterm2/AppSupport/ \
--exclude .vim/bundle/youcompleteme/ \
-vRrlptze "ssh -o PermitLocalCommand=no" %d/./.screenrc %d/./.gitignore %d/./.bash_profile %d/./.ssh/git_ed25519.pub %d/./.ssh/authorized_keys %d/./.vimrc %d/./.zshrc %d/./.config/iterm2/ %d/./.vim/ %d/./bin/ %d/./.bash/ %r@%n:/home/%r
What this does, is to copy across the specified files and directories containing your personal preferences to the remote host(s) matching the given IP address(es), hostnames and user(s) on first login and updates them on subsequent logins.
It just really runs an rsync command as specified on successful login.