There's certainly no technical reason it shouldn't work, but keep in mind in order to do that you'd still possibly need to provide a password to sudo on the other side (depending on its configuration). You'd probably want to prompt the local side and send it across, or talk to the sysadmin and get them to allow you to run the one command NOPASSWD: in sudoers.
| [reply] |
Yes, it works fine. I've done it before and it's not overly complicated, although I can't provide code as it's been half a year since my contract with that client expired and I've forgotten most of what I knew about Expect in that time. If you know Expect, it's pretty straightforward. If you don't know Expect, it shouldn't take more than a couple hours (if that) of poking around PerlMonks to get up to speed, and then it's pretty straightforward. | [reply] |