473,399 Members | 3,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

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?

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
6 2619
numberwhun
3,509 Expert Mod 2GB
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
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
4,059 Expert 2GB
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
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
4,059 Expert 2GB
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
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

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

Similar topics

1
by: fortepianissimo | last post by:
This is a question only relevant to Mac OS X. Could someone offer a simple example how to use Carbon.File module (perhaps Alias.FSResolveAlias()?) to resolve an alias? Basically I'd like to load...
0
by: Frans Englich | last post by:
Hello all, Due to the size of my source, I want to split it up into multiple files(basically one class in each file), but then I have difficulties with the directory layout when the modules are...
0
by: Rafael Lopez | last post by:
How can i configure a computer to use the MSDN HELP of Visual Studio .NET that resides in other computer? Thanks. My clients that not have disk space enough to support the MSDN HELP installed...
2
by: Kenneth McDonald | last post by:
I'd like to propose a new PEP , for a standard library module that deals with files and file paths in an object oriented manner. I believe this module should be included as part of the standard...
7
by: Dave Smithz | last post by:
Hi There, Having last developed an Access DB for a client about a year ago I have today received a specification that I need to (today ideally) give an indication of how much I would charge and...
4
by: abcd | last post by:
I have the following directory/file structure... c:\foo\utils.py c:\foo\bar\ok.py In ok.py I want to do something like... import utils utils.helpMeDoSomething(....)
0
by: MiRUNIT | last post by:
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for...
2
by: EuGeNe Van den Bulke | last post by:
Hi there, I have a "problem" which could be a bad design on my behalf but I am not sure so ... I have a package WMI which contains a module hauteur.py which, when imported, load data from a...
1
by: Lastknight | last post by:
hello all, can some bidy suggest me how to code for this problem? how to write a perl program using Apache::Session::File module? regards lastknight..
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.