I try to migrate shell code to Python fabric code. The issue I meets is that Python can not execute command with root in a remote Linux host. Could anyone meet this issue and figure it out? I am very appreciate for your help. Thanks in advance.TestHost1=host01 host02 host03for host in $TestHost1do sshpass -p password ssh -T -q -o UserKnownHostsFile=/dev/null \                           -o StrictHostKeyChecking=no username@$host << EOL;sudo su -sed -i 's/10./172./g'/etc/hostsEOLdone
Can not execute command with root in a remote Linux host
shell;ssh