Skip to main content
deleted 3 characters in body
Source Link

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

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

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).

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).

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).

deleted 135 characters in body
Source Link

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) and passing it as environment to ssh and export PARAMETER before invocation of ssh command (or PARAMETER="$PARAMETER" ssh ...).

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) and passing it as environment to ssh and export PARAMETER before invocation of ssh command (or PARAMETER="$PARAMETER" ssh ...).

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).

Post Undeleted by Tomilov Anatoliy
added 256 characters in body
Source Link

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

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

The advantage of the approach is absence of the requirement to export PARAMETER or using, adding its name to envAcceptEnv (in case of names not starting from LC_) in form:config /etc/ssh/sshd_config on remote host, adding to SendEnv on local host (to -o or to /etc/ssh/ssh_config) and passing it as environment to ssh and export PARAMETER before invocation of ssh command (or PARAMETER="$PARAMETER" ssh ...).

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

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

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

The advantage of the approach is absence of the requirement to export PARAMETER or using env in form:

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

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) and passing it as environment to ssh and export PARAMETER before invocation of ssh command (or PARAMETER="$PARAMETER" ssh ...).

added 256 characters in body
Source Link
Loading
Post Deleted by Tomilov Anatoliy
Source Link
Loading