it IS possible, BUT
you need some kind of remote shell (rsh) which accepts username
and password and of course a properly configured sudo
sth like that (just a nonfunctional example):
echo system("sudo rsh 10.11.12.13 login pw command");
I used this some time ago, but in a severed network, using passwordless
login (via .rhosts file), but that's ugly unsafe (!!)