Skip to main content
4 of 5
deleted 135 characters in body

Among other tricks (like passing LC_* environment variables) you can do the following:

PARAMETER="123" ssh user@host PARAMETER="$PARAMETER" bash -s <<- __EOF echo \$PARAMETER __EOF 

The advantage of the approach is absence of the requirement to export PARAMETER, adding its name to AcceptEnv (in case of names not starting from LC_) in config /etc/ssh/sshd_config on remote host, adding to SendEnv on local host (to -o or to /etc/ssh/ssh_config).