in reply to Remote Execution of a Command in Linux Box

Line 12 is the login line, have you cheched that you can connect with the same credentials from the same client machine using ssh? Ensure valid login credentials. If this works, enable debugging as described in the module documentation.

  • Comment on Re: Remote Execution of a Command in Linux Box

Replies are listed 'Best First'.
Re^2: Remote Execution of a Command in Linux Box
by bihuboliya (Acolyte) on Dec 10, 2013 at 10:45 UTC
    Hi, I have checked that I can connect to the machine using ssh. I have turned on debug and got the following output.
    anupambordoloi.local: Reading configuration data /Users/anupam.bordolo +i/.ssh/config anupambordoloi.local: Reading configuration data /etc/ssh_config anupambordoloi.local: Connecting to 192.168.112.191, port 22. anupambordoloi.local: Remote version string: SSH-2.0-OpenSSH_5.3 anupambordoloi.local: Remote protocol version 2.0, remote software ver +sion OpenSSH_5.3 anupambordoloi.local: Net::SSH::Perl Version 1.36, protocol version 2. +0. .nupambordoloi.local: No compat match: OpenSSH_5.3 anupambordoloi.local: Connection established. anupambordoloi.local: Sent key-exchange init (KEXINIT), wait response. anupambordoloi.local: Algorithms, c->s: 3des-cbc hmac-sha1 none anupambordoloi.local: Algorithms, s->c: 3des-cbc hmac-sha1 none anupambordoloi.local: Entering Diffie-Hellman Group 1 key exchange. anupambordoloi.local: Sent DH public key, waiting for reply. anupambordoloi.local: Received host key, type 'ssh-dss'. anupambordoloi.local: Host '192.168.112.191' is known and matches the +host key. anupambordoloi.local: Computing shared secret key. anupambordoloi.local: Verifying server signature. anupambordoloi.local: Waiting for NEWKEYS message. anupambordoloi.local: Send NEWKEYS. anupambordoloi.local: Enabling encryption/MAC/compression. anupambordoloi.local: Sending request for user-authentication service. anupambordoloi.local: Service accepted: ssh-userauth. anupambordoloi.local: Trying empty user-authentication request. anupambordoloi.local: Authentication methods that can continue: public +key,keyboard-interactive. anupambordoloi.local: Next method to try is publickey. Permission denied at net_ssh_perl.pl line 12.

      This smells like a password problem. Please change

      my $pass = "admin\@123";

      into

      my $pass = 'admin@123';

      and try again.

      (If you put the password into single quotes then perl won't try to parse your string.)
        Thanks Thomas for your reply. I had already checked the same but it did not work :(