By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,246 Members | 1,515 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,246 IT Pros & Developers. It's quick & easy.

Help with File::Remote module

P: 3
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?

Expand|Select|Wrap|Line Numbers
  1.  
  2.        use File::Remote;
  3.        my $secure = File::Remote->new(rsh => '/usr/local/bin/ssh',
  4.                                       rcp => '/usr/local/bin/scp',
  5.                                       tmp => '/var/run');
  6.        $secure->copy($src, $dest);
  7.  
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
Oct 15 '07 #1
Share this Question
Share on Google+
6 Replies


numberwhun
Expert Mod 2.5K+
P: 3,503
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?

Expand|Select|Wrap|Line Numbers
  1.  
  2.        use File::Remote;
  3.        my $secure = File::Remote->new(rsh => '/usr/local/bin/ssh',
  4.                                       rcp => '/usr/local/bin/scp',
  5.                                       tmp => '/var/run');
  6.        $secure->copy($src, $dest);
  7.  
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
Oct 15 '07 #2

P: 3
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.
Oct 15 '07 #3

KevinADC
Expert 2.5K+
P: 4,059
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.
Oct 16 '07 #4

P: 3
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
Oct 16 '07 #5

KevinADC
Expert 2.5K+
P: 4,059
Like I said, the module does not appear to support passing passwords, so I am not sure how you can use it.
Oct 16 '07 #6

P: 1
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
Nov 29 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.