SSH

Running local scripts on remote host

ssh user@server 'bash -s' <<'EOF'
# ...commands
whoami
EOF