2 ms·
I tend to save the base64 output sometimes and just run ssh $server "echo <base64-string> | base64 -d | bash" and I can check later wth I was running earlier.
by isodude 5y ago
I tend to save the base64 output sometimes and just run
ssh $server "echo <base64-string> | base64 -d | bash"
and I can check later wth I was running earlier.
Other than that, it just makes it kinda obvious that it will not break in any scenario, period. It just feels better, make sense?
As someone wrote here avoiding the expansion issues is really nice.
It is also very easy to compress with xz, but hey, then you could just use xz to begin with! Well, I don't know how wierd binary data will effect stdout in all scenarios. So yet again I stay with safe. I know that you send tar and what not over ssh pipes, but I really don't trust bash that much.
Another nice way would be
ssh $server bash <<'EOF'
echo hello world
EOF
You could not use the stdin then sadly, but that I solvable.