#!/usr/bin/env bash set -eu mk_src() { cd /home/totem4/Apps/my_script/sshrc/conf.d tar -czO * | base64 -w0 } scpt=$(mk_src) ssh -t $1 "mkdir -p /tmp/totem4rc; cd /tmp/totem4rc; echo ${scpt} | base64 -di | tar -xzf - ; cd ; bash --rcfile /tmp/totem4rc/bashrc -i; rm -r /tmp/totem4rc"