I am trying to execute the script file sc.sh on remote machine user@remote-01 using ssh. I also need to pass the arguments while executing this ssh command. So that i have to use those arguments in sc.sh. This is my script which I am trying to execute
sshpass -p 'pswd' ssh user@remote-01 "bash -s" < /home/user/sc.sh
My sc.sh looks like:
if var1 -eq True; then
if var2 -eq True; then
if var3 -eq True; then
..... so on
How can i pass var1, var2, var3 as arguments and use them in my script as above?