Skip to content(if available)orjump to list(if available)

Show HN: Shittp – Volatile Dotfiles over SSH

sdovan1

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 base64 string is a really cool approach.

[1]: https://github.com/fsquillace/kyrat/

goku12

How about mounting your dotfiles directory (~/.config) or even your entire home directory on the remote system using SSHFS or NFS? I'm sure somebody would have tried it or some project may already exist. Any idea why that isn't as prevalent as copying your dotfiles over?

twp

chezmoi has similar functionality, but it does install a binary on the target machine:

https://www.chezmoi.io/reference/commands/ssh/

Y_Y

  tmp="$(mktemp -d)" && rsync -a --exclude='.ssh' user@host:~/.[!.]* "$tmp"/ && HOME="$tmp" exec "$SHELL"

grepfru_it

I think this will copy your 9gb Mozilla cache directory as well? Still one liners like this is all you need lol

imiric

I use something similar.

It's surprising to me how many projects can be replaced with just a line or two of shell script. This project is a slightly more sophisticated shell script that exposes a friendlier UI, but I don't see why it's needed when the alternative is much simpler, considering the target audience.

tensegrist

time to call the it team at work (on the phone) to ask them to add a new item to the software allowlist

grepfru_it

Be careful, this will force your defaults over system defaults possibly overriding compliance or security settings. There are a few places I noticed where well-placed malware could hop in etc.

It’s not bad software, it’s also not mature. I’m currently on a phone and on vacation so this is the extent of my review. Maybe I’ll circle back around with some PRs next week

tensegrist

i was merely joking about the name apparently being intended to be pronounced in a rather juvenile manner

null

[deleted]

simmo9000

Just wake up and LOL. Good shit!