in reply to Having trouble installing Module on Strawberry Perl

IO::Tty doesn't seem to work on Windows, and that's not really surprising as Windows doesn't have much in the sense of TTYs in the first place. So I think it's unlikely that you'll get this to work.

  • Comment on Re: Having trouble installing Module on Strawberry Perl

Replies are listed 'Best First'.
Re^2: Having trouble installing Module on Strawberry Perl
by taffer (Novice) on Jan 16, 2009 at 20:42 UTC
    Thanks, that makes sense. That leads to another question. Does anyone know of another module that would allow me to ssh int a remote Linux PC, be able to su to another user, and be able to run commands as that user?

      Net::SSH::Perl and SSH or OpenSSH, or maybe just log in as the target user directly:

      open my $remote, '| ssh otheruser@remotehost' or die "Couldn't connect: $!"; print {$remote} "echo Test\n";

      But that way, you don't get much interactivity and this only works if you have passwordless keys set up or store the key in pageant or another ssh keyring.

        I can't log in as the target user, since the target user is root, and root logins are disallowed on the remote machine. I also need a fair amount of interactivity. What I am trying to do is login, switch to root, kill the dhcp process, grab the leases file, parse it and pull out specific leases for processing, delete some of the leases, and finally restart the dhcp process.