Grateful thanks to @Fravadone for illuminating the root of the problem.
I mistakenly remembered that I had to use the " symbol when specifying ssh options.That is why I wrote e.g.:o1='"NumberOfPasswordPrompts=0"'
So this is the good syntax:
o1=NumberOfPasswordPrompts=0
o2=NumberOfPasswordPrompts=1
o3=ConnectTimeout=100
x=`sshpass -p "$psw" ssh -q -o $o2 -o $o3 2>/dev/null $usr@$srv <<ZZZ
### some command e.g.:
sudo -u oracle -i
export LANG=en_US.UTF-8
ORACLE_HOME=$home
export ORACLE_HOME # export ORACLE_BASE ORACLE_HOME
PATH=\\$ORACLE_HOME/bin:\\$PATH
\\$ORACLE_HOME/OPatch/opatch lsinv
ZZZ`
And also good without the '=' sign. (But it isn't documented.) In this case, of course I have to use the " sign.
o1="NumberOfPasswordPrompts 0"
o2="NumberOfPasswordPrompts 1"
o3="ConnectTimeout 100"
x=`sshpass -p "$psw" ssh -q -o "$o2" -o "$o3" 2>/dev/null $usr@$srv <<ZZZ
### some command e.g.:
sudo -u oracle -i
export LANG=en_US.UTF-8
ORACLE_HOME=$home
export ORACLE_HOME # export ORACLE_BASE ORACLE_HOME
PATH=\\$ORACLE_HOME/bin:\\$PATH
\\$ORACLE_HOME/OPatch/opatch lsinv
ZZZ`