ssh -p22 [email protected]"$RM -f $LR"
Substitute the local values of RM and LR.
is it possible to pass the value of a variable
Only variables known in advance by the ssh server on the other side, only when using the SSH version 2 protocol.From man ssh_config:
Specifies what variables from the local environ(7) should be sent to the server.Note that the environment must be supported for protocol 2.The server must also be supported.
configured to accept these environment variables.Refer to AcceptEnv in sshd_config(5).Variables are specified by name, which may contain wildcard characters.Multiple
environment variables may be separated by whitespace or spread across multiple SendEnv directives.The default is to send any environment variables.
But the question arises: why transfer them, if everything you need can be transferred on the command line?