I have a script that will ssh to another server.
Script A will get the value of $variableA, then will ssh to another server to execute a script B which will need the value of $variableA.
I tried below but script B is not recognizing the value of $variableA
scriptA"
varA=`hostname` ssh -x serverB "/home/dir/scriptb.sh $varA"
Script B from 2nd server:
echo $varA
ScriptB from 2nd server won't echo $varA.
varA=$1
?