I often need to login to colleagues' machines at work, but I find that their settings are not what I am familiar with. So I wrote an SSH wrapper in POSIX shell which tars dotfiles into a base64 string, passes it to SSH, and decodes / setups on the remote temp directory. Automatically remove when session ends. Supported: .profile, .vimrc, .bashrc, .tmux.conf, etc. This idea comes from kyrat[1]; passing files via a bas…
scp my-precious-dotfiles remote:~ trap 'ssh remote rm my-precious-dotfiles' EXIT ssh remote Or you can even bake the trap into the remote bash's invocation, although that'd be a bit harder.
Show HN: Shittp – Volatile Dotfiles over SSH
71–80 of 97 posts
Re: Show HN: Shittp – Volatile Dotfiles over SSH
#72Earlier quoted context omitted.
Ok, but what if your colleague does not have Vim installed? Wouldn't it make more sense to have a tool that brings files over to the local computer, starts Vim on them, and then copies them back?
I can’t recall encountering a system in the last 15 years that didn’t have vim (or at least vi for esoteric things) on it.
Re: Show HN: Shittp – Volatile Dotfiles over SSH
#73I often need to login to colleagues' machines at work, but I find that their settings are not what I am familiar with. So I wrote an SSH wrapper in POSIX shell which tars dotfiles into a base64 string, passes it to SSH, and decodes / setups on the remote temp directory. Automatically remove when session ends. Supported: .profile, .vimrc, .bashrc, .tmux.conf, etc. This idea comes from kyrat[1]; passing files via a bas…
Re: Show HN: Shittp – Volatile Dotfiles over SSH
#74${HOME} is where your dotfiles are.
Re: Show HN: Shittp – Volatile Dotfiles over SSH
#75I didn't look closely at the project, but why take the extra step of base64? I do this all the time with tar by itself and it's wire-proof enough to work fine.
$ tar cf - ~/.shrc | ssh target '(cd ~ && tar xf -)'Re: Show HN: Shittp – Volatile Dotfiles over SSH
#76Earlier quoted context omitted.
scp my-precious-dotfiles remote:~ trap 'ssh remote rm my-precious-dotfiles' EXIT ssh remote Or you can even bake the trap into the remote bash's invocation, although that'd be a bit harder.
That overwrites the remote dotfiles. Any workarounds?
Keep the alternate sets in different subdirectories.
Re: Show HN: Shittp – Volatile Dotfiles over SSH
#77Earlier quoted context omitted.
scp my-precious-dotfiles remote:~ trap 'ssh remote rm my-precious-dotfiles' EXIT ssh remote Or you can even bake the trap into the remote bash's invocation, although that'd be a bit harder.
That overwrites the remote dotfiles. Any workarounds?
Edit: just remembered there was a good comparison of lnk and stow on the HN discussion of lnk from a few months back [1].
Re: Show HN: Shittp – Volatile Dotfiles over SSH
#78I often need to login to colleagues' machines at work, but I find that their settings are not what I am familiar with. So I wrote an SSH wrapper in POSIX shell which tars dotfiles into a base64 string, passes it to SSH, and decodes / setups on the remote temp directory. Automatically remove when session ends. Supported: .profile, .vimrc, .bashrc, .tmux.conf, etc. This idea comes from kyrat[1]; passing files via a bas…
I'd hate to jump to conclusions, but what username are you looking into what machines with for that to be an issue?
Re: Show HN: Shittp – Volatile Dotfiles over SSH
#79tmp="$(mktemp -d)" && rsync -a --exclude='.ssh' user@host:~/.[!.]* "$tmp"/ && HOME="$tmp" exec "$SHELL"
git clone $uri dotfiles; export HOME=$(pwd)/dotfiles
These days, my laptop acts as a dumb SSH gateway for Linux VMs. No configuration or setup, aside from VS code connecting to VMs. Any server that I would want to load my dotfiles onto will almost always have git installed.Rant (not directed at any comment here): If it's a production server without git, then please do not run scripts like this. Do not create junk directories on (or ideally any modifications to) secure machines. It inevitably causes new and uninteresting puzzles for your colleagues. Create documented workflows for incident responses or inspection.
Re: Show HN: Shittp – Volatile Dotfiles over SSH
#80Earlier quoted context omitted.
Ok, but what if your colleague does not have Vim installed? Wouldn't it make more sense to have a tool that brings files over to the local computer, starts Vim on them, and then copies them back?
I can’t recall encountering a system in the last 15 years that didn’t have vim (or at least vi for esoteric things) on it.
I've been on a lot of systems and can't remember a single instance of not having vi (though I do vim). So pretty rare, like you said