Help with File::Remote module

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mmccaws
    New Member
    • Oct 2007
    • 3

    Help with File::Remote module

    I understand that one can use FILE::REMOTE for SSH and SCP sessions. However I don't see how to apply the login password or the userID in the examples. Am I misreading the intent of the module?

    Code:
           use File::Remote;
           my $secure = File::Remote->new(rsh => '/usr/local/bin/ssh',
                                          rcp => '/usr/local/bin/scp',
                                          tmp => '/var/run');
           $secure->copy($src, $dest);
    secure copy of SSH requires a password, or am I missing something?

    Oh yes, I tried to install Net::SSH::Perl, but I won't be able to use that module. Please stick to this module.

    Thanks

    Mike
    Last edited by numberwhun; Oct 15 '07, 10:58 PM. Reason: Add a more descriptive title
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    Originally posted by mmccaws
    I understand that one can use FILE::REMOTE for SSH and SCP sessions. However I don't see how to apply the login password or the userID in the examples. Am I misreading the intent of the module?

    Code:
           use File::Remote;
           my $secure = File::Remote->new(rsh => '/usr/local/bin/ssh',
                                          rcp => '/usr/local/bin/scp',
                                          tmp => '/var/run');
           $secure->copy($src, $dest);
    secure copy of SSH requires a password, or am I missing something?

    Oh yes, I tried to install Net::SSH::Perl, but I won't be able to use that module. Please stick to this module.

    Thanks

    Mike
    I have changed the title of you post because "m" was just not nearly descriptive enough of the issue you are having. In the future, please choose titles that are appropriate to your issue.

    Regards,

    Jeff

    Comment

    • mmccaws
      New Member
      • Oct 2007
      • 3

      #3
      Originally posted by numberwhun
      I have changed the title of you post because "m" was just not nearly descriptive enough of the issue you are having. In the future, please choose titles that are appropriate to your issue.

      Regards,

      Jeff
      Thanks for the title correction. Didn't catch that.

      Comment

      • KevinADC
        Recognized Expert Specialist
        • Jan 2007
        • 4092

        #4
        That module appears to have no support for passing a password or username. Under the NOTES heading:

        NOTES ^

        File::Remote only works on UNIX systems.

        The main caveat to File::Remote is that you have to have rsh/rcp or ssh/scp access to the hosts you want to manipulate files on. Make sure you consider the security implications of this, especially if you live outside a firewall.

        Comment

        • mmccaws
          New Member
          • Oct 2007
          • 3

          #5
          Originally posted by KevinADC
          That module appears to have no support for passing a password or username. Under the NOTES heading:

          NOTES ^

          File::Remote only works on UNIX systems.

          The main caveat to File::Remote is that you have to have rsh/rcp or ssh/scp access to the hosts you want to manipulate files on. Make sure you consider the security implications of this, especially if you live outside a firewall.
          I've already tested the SSH and SCP from command line. But won't the script need to provide the password? If so, where is it applied?

          Mike

          Comment

          • KevinADC
            Recognized Expert Specialist
            • Jan 2007
            • 4092

            #6
            Like I said, the module does not appear to support passing passwords, so I am not sure how you can use it.

            Comment

            • cryptian
              New Member
              • Nov 2007
              • 1

              #7
              This thread interests me as I've been looking at a similar problem. I did briefly look at File::Remote but ended up deciding that I had to use Net::SSH::Perl. I'm writing a Windows client that needs to connect with routers over SSH and SCP in order to remotely configure them.

              Having surmounted the problem of issues with installing Math::Pari (I recommend getting the PPM as its already compiled :)), I'm still getting odd behaviour with establishing an SSH connection. For instance, the check of the version matching takes the routers software version string, i.e. the 'Version_1.0' out of 'SSH-2.0-Version_1.0' and tries to enforce a match on what is an advisory piece of text as far as the SSH protocol is concerned. The author must have just been lucky !

              Now I'm getting a problem setting the socket to non-blocking. If anyone knows about this or has a solution then please do respond.

              Cryptian

              Comment

              Working...