in reply to Input Type Error when setting up a SSH connection with Net::SSH::Perl

It'd help if you set $pass. You can avoid these types of errors with use strict;.

use strict; ... print "Enter your username: "; chomp(my $user = <STDIN>); print "Enter your pass on that host: "; chomp(my $pass = <STDIN>); ...

Hope this helps.

antirice    
The first rule of Perl club is - use Perl
The
ith rule of Perl club is - follow rule i - 1 for i > 1

  • Comment on Re: Input Type Error when setting up a SSH connection with Net::SSH::Perl
  • Download Code

Replies are listed 'Best First'.
Re: Re: Input Type Error when setting up a SSH connection with Net::SSH::Perl
by Anonymous Monk on Jul 15, 2003 at 11:24 UTC
    When using "use strict":
    How do I use the variables then ?
    I need to use "the explicit package name"... what is it for my global variables?!?

    Not using strict but cleartext passwords - hardcoded:
    When setting the $pass to a fixed value I can login but
    afterwards when executing any command with

    $ssh->cmd($command)

    I get the same error - it looks to me like the values read in from the STDIN are not crypted in the right way.
    Is there any possibility to solve this problem ?

    Thangs again


    Mark
Re: Re: Input Type Error when setting up a SSH connection with Net::SSH::Perl
by BananaJoe (Initiate) on Jul 15, 2003 at 11:27 UTC
    When using "use strict":
    How do I use the variables then ?
    I need to use "the explicit package name"... what is it for my global variables?!?

    Not using strict but cleartext passwords - hardcoded:
    When setting the $pass to a fixed value I can login but
    afterwards when executing any command with

    $ssh->cmd($command)

    I get the same error - it looks to me like the values read in from the STDIN are not crypted in the right way.
    Is there any possibility to solve this problem ?

    Thangs again


    Mark