Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks!
I need help here, I am trying to open a directory on this linux server from a windows box using a perl script to get a file that was previously ftp in there, I can't use Net::SSH::Perl, is there any other way to accomplish such a thing? Like using some system(ssh some command here) command, and go to the directory I want, grab the file and be done with it?

Replies are listed 'Best First'.
Re: SSH Help
by ww (Archbishop) on Feb 26, 2008 at 21:09 UTC
    1. I need help here,
      s/need/request/
    2. I can't use NET::SSH::Perl,
      Why not?

    Re 2: Generally (nearly universally) there's a way to use an appropriate module, even if you have restricted rights on the target machine...and if your issue is that you don't have rights to the directory where the ftp'ed file is stored, then your question is one for the sysadmin.

    And, even more generally, you'll get better help here if you provide more specific information about your problem, and show the code and failure modes of that code (or how the output failed to meet your expectations

Re: SSH Help
by NetWallah (Canon) on Feb 26, 2008 at 21:32 UTC
    If you install putty (free, and great software), you can use it's command line syntax either directly, or embedded in a perl script.

    Per the documentation, you may even use "psftp" from the command line, to do secure FTP.

         "As you get older three things happen. The first is your memory goes, and I can't remember the other two... " - Sir Norman Wisdom

Re: SSH Help
by anthski (Scribe) on Feb 26, 2008 at 21:57 UTC
    You could use Expect, either the tcl version or the perl module. It would be good to see some example code from your attempts with Net::SSH::Perl and the output from it which indicates you can't use it.
Re: SSH Help
by salva (Canon) on Feb 26, 2008 at 22:02 UTC