I am in a big mess.
I have to execute command on remote machine using perl script.
I have used INET Socket module to do this operation.
Following is the code snipet.
Expand|Select|Wrap|Line Numbers
- use IO::Socket;
- $socket = IO::Socket::INET->new (PeerAddr => "x:x:x:x",PeerPort => "ssh(zzz)",Proto => "tcp");
- if ($socket)
- { print "f";
- }
- else
- {print "g";}
Will appreciate , if anyone can throw light on it.
Regards,
Shrek.