You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
289 B
Bash

3 years ago
#!/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"