logoalt Hacker News

Joker_vDtoday at 3:09 PM0 repliesview on HN

   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.