How does user input work for running local scripts remotely?
My script uses $1 for user input.
The remote machine names vary, so I wrote a script(main_script.sh), which also uses $1 to read the name of the remote machine.
Ex:
./main_script.sh remote3 lcl_script.sh <user_in>
But user input is not recognized.
remote3 is the name of the remote machine
Main script:
ssh root@$1 'bash -s' < $2
where, $1 is for machine name. $2 is for the local script.
Local script:
printf "new setting:"
echo $1
where $1 is the user_in