File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ function moshrc() {
99 if [ -d $SSHHOME /.sshrc.d ]; then
1010 files=" $files .sshrc.d"
1111 fi
12- SIZE=$( tar cz -h -C $SSHHOME $files | wc -c)
12+ SIZE=$( tar cfz - -h -C $SSHHOME $files | wc -c)
1313 if [ $SIZE -gt 65536 ]; then
1414 echo >&2 $' .sshrc.d and .sshrc files must be less than 64kb\n current size: ' $SIZE ' bytes'
1515 exit 1
4444) ' | xxd -p -r > \$ SSHHOME/bashsshrc
4545 chmod +x \$ SSHHOME/bashsshrc
4646
47- echo $'$( tar cz - h -C $SSHHOME $files | xxd -p) ' | xxd -p -r | tar mxz -C \$ SSHHOME
47+ echo $'$( tar czf - - h -C $SSHHOME $files | xxd -p) ' | xxd -p -r | tar mxzf - -C \$ SSHHOME
4848 export SSHHOME=\$ SSHHOME
4949 bash --rcfile \$ SSHHOME/sshrc.bashrc
5050 "
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ function sshrc() {
66 if [ -d $SSHHOME /.sshrc.d ]; then
77 files=" $files .sshrc.d"
88 fi
9- SIZE=$( tar cz -h -C $SSHHOME $files | wc -c)
9+ SIZE=$( tar cfz - -h -C $SSHHOME $files | wc -c)
1010 if [ $SIZE -gt 65536 ]; then
1111 echo >&2 $' .sshrc.d and .sshrc files must be less than 64kb\n current size: ' $SIZE ' bytes'
1212 exit 1
4848 ) " ' | tr -s ' ' $'\n' | openssl enc -base64 -d > \$ SSHHOME/bashsshrc
4949 chmod +x \$ SSHHOME/bashsshrc
5050
51- echo $'" $( tar cz - h -C $SSHHOME $files | openssl enc -base64) " ' | tr -s ' ' $'\n' | openssl enc -base64 -d | tar mxz -C \$ SSHHOME
51+ echo $'" $( tar czf - - h -C $SSHHOME $files | openssl enc -base64) " ' | tr -s ' ' $'\n' | openssl enc -base64 -d | tar mxzf - -C \$ SSHHOME
5252 export SSHHOME=\$ SSHHOME
5353 bash --rcfile \$ SSHHOME/sshrc.bashrc
5454 "
You can’t perform that action at this time.
0 commit comments