Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: Net::FTP Help

by cybear (Monk)
on Aug 26, 2002 at 16:57 UTC ( [id://192947]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Net::FTP Help
in thread Net::FTP Help

Sorry for the confusion... let me be more precise.

I have effectively beaten the same limitation that is sited in the original post.
You need to be on a unix/linux workstation running Xwindows, or you need to have
an Xwindows emulator, such as eXceed, running on your Windows/Mac workstation. Then...

Write your Perl script to use Net::Telnet. Log in to the remote machine. Then "su" to root, /usr/bin/su - root
as root have your script start a shell session /usr/bin/sh -display what.every.your.ip
and pass it the "display" parameter. This WILL send the output from the shell to the IP address
that you specify.

Once your shell window opens up on your workstation, you can have your script start ftp. You will be
starting FTP as root. The main diffrence will be that you must put instead of get.

disclamer: this will not work "server-to-server". This will only work, as discribed, if you are
trying to connect from a workstation, running unix/linux, or a workstation running an Xwindows
emulator... but it absolutely does work.

- cybear

Replies are listed 'Best First'.
Re: Re^3: Net::FTP Help
by RMGir (Prior) on Aug 26, 2002 at 20:28 UTC
    Sorry, cybear, but Net::Telnet has the same problem as Net::FTP does: it will send your root password across the wire in clear text.

    If you're going to try to do something like this, please use Net::SSH or Net::SSH::Perl.
    --
    Mike

      That part is absolutely correct... for sure this time. :-)

      - cybear

Re: Re^3: Net::FTP Help
by waswas-fng (Curate) on Aug 26, 2002 at 17:08 UTC
    bah, let me be more precise.

    [DING!] 1 [~]:msp-mainserver% /usr/bin/sh -display www.myhost.com:0.0 -display: bad option(s) [12:00pm] 2 [~]:msp-mainserver% /usr/bin/ftp -display www.myhost.com:0 +.0 ftp: s: unknown option
    Command line programs dont have a -display command line flag, You are seriously confused. /usr/bin/sh and ftp are not gui on any system I have ever worked on (Solaris, any distro of linux, aix, hpux, irix etc). but it absolutely does work. on what unix? I think not.

    -Waswas
      You know what...

      replace /usr/bin/sh with /usr/openwin/bin/xterm
      been a while...

      sorry about that. But it does work. :-)

      - cybear

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://192947]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-03-19 06:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found