Hacker News new | ask | show | jobs
by tbronchain 1064 days ago
I've had some pretty good success doing something like:

ssh user@host << EOF

Your script

EOF

Beware of local variables interpretation though!

1 comments

Bash lets you suppress local expansions by using <<'EOF' instead of <<EOF.

But if you need a mix of local and remote expansion, you're back to doing a lot of escaping.

Wow, that is something I had no idea about! Thanks!