Absolutely no idea what you are talking about there:
ftp someserver.com -display your.ip.add.ress:0.0
You seem to be confusing ftp and sh with X apps. FTP (unless you have some goofy replacement ftp client like mftp or something renamed as ftp in your path) is not graphical and the –display flag will just error out on you. Your solution will not work and really does not answer this posters problem.
On to the problem, the original poster is confused between telnet and FTP. FTP is File Transfer Protocol; there is no
su command for FTP. You have two (or maybe even more) issues here.
First, Net::FTP will allow you to connect to a remote FTP server and login, upload and download files list directories and so on. If this is not what you are looking for then you need a different module.
Second After reading your question I think I can pull out what your problem is, you are trying to use Net::FTP to connect to a ftp server, you are trying to login to the ftp server as root and since /etc/ftpusers (or wherever the file that accomplishes the same thing is on your ftp server) has a “root” entry you can't log in as root. Why do you need to log in as root? FTP auth is all plain text and anyone on your network could snoop your root password – root login via FTP is a
_BAD_ idea. I would take a step back and think about what you are trying to accomplish. Do you really need root access to push or pull the files from that server? If the answer is yes I would consider using the SCP mods to do so. SCP uses encrypted logins and file transfers. If the answer is no I would set up the push or pop locations to be usable by a non system user and do the transfers that way. If you feel like your really _MUST_ login as root directly with FTP then (depending on the ftpd your system uses – some are hard coded not to allow root logins ever) you may edit the file /etc/ftpaccess on the ftp server and remove “root” from the file. That will allow you to login as root with FTP. If you choose the last approach there is something wrong with you. =)
-Waswas
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.