I\'m trying to login to a ssh server and to execute something like:
ssh user@domain.com \'sudo echo \"foobar\"\' >
ssh user@domain.com \'sudo echo \"foobar\"\'
How about adding this in the sudoers file:
user ALL=(ALL) NOPASSWD: ALL