Echo Enter the Report ID
read varname
ssh -t root@192.168.10.10 '
python myscript.py --user User1 --password Password1 --report \$varname
'
I am trying pass an argument 'varname' to a remotely located python script using ssh but unable to do so. Getting an error 'Invalid report uuid provided'
Value for --report looks like as follow efc4c534-5d1d-11e9-844b-fa163e069095
答案 0 :(得分:1)
varname
is defined locally only, so $varname
needs to be expanded:
$varname
.Echo Enter the Report ID
read varname
ssh -t root@192.168.10.10 "python myscript.py --user User1 --password Password1 --report $varname"