All Forums
 Embedded Linux
 Linux FAQ
 Can I use telnet and ftp on my board?
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

jlackey

213 Posts

Posted - 23 May 2002 :  16:46:02  Show Profile  Email Poster
Update 2/4/05: If you are using the Debian-based root filesystems, see below for updated information

Can I use telnet and ftp on my board?

Yes. Depending on the root file system you are using you may need to configure or install software first. This topic describes the steps necessary for using these feature on our ramdisk root file system. If you are using a different root file system (e.g. the Debian distriution), differet steps may be necessary.

With our ramdisk root file system, your board should already support telnet both ways and act as an ftp client.

To enable your board to be an ftp server, follow the instructions in one of the sections below. Look at Setting my board up as an ftp server if you are using one of our recent ramdisks. If you are using an old ramdisk (provided with the Linux 2.4.9-ac10-rmk2-np1-ads3 kernel, or earlier) look at Installing an ftp server on my board or consider upgrading.

Setting my board up as an ftp server

Unless you have an old ramdisk, most of the ftp server setup already done for you. All you have do is

1. First, uncomment the ftpd line in /etc/inetd.conf

2. Then, 'chmod a+rwx ~ftp' if you want to allow ftp to save files on the ramdisk.

3. Finally, kill -HUP the inet daemon to restart it with ftp enabled. (See What do you mean, 'kill -HUP the inet daemon'? below if you don't know what this means.)

Installing an ftp server on my board

Here is an ftp daemon and the source code (from ftp.troll.no/freebies/ftpd) so your board can be an ftp server.

It works for anonymous ftp if you do the following:

1. Put the ftpd daemon in /usr/sbin/ and rename it 'in.ftpd':
    mv /mnt/ftpd /usr/sbin/in.ftpd

2. Create /ftp and /ftp/bin directories under /home and give everyone read/execute access to them:
    mkdir /home/ftp
    mkdir /home/ftp/bin
    chmod 755 /home/ftp /home/ftp/bin

3. Create a /pub directory under /home/ftp and give everyone FULL access to that:
    mkdir /home/ftp/pub
    chmod 777 /home/ftp/pub

4. Edit /etc/inetd.conf to remove the comment on the ftp line.

5. Finally, kill -HUP the inet daemon to restart it with ftp enabled.

You should now be able to connect from another machine as 'ftp' or 'anonymous' and be able to 'cd, ls, put, & get' to/from the pub/ directory.

What do you mean, 'kill -HUP the inet daemon'?

To "kill -HUP" a process means to restart that process (e.g. enter the command 'kill -HUP 1' to rerun the init process.)

Try this:
    ps -e | grep inetd

you'll get something like:
    103   0,0   00:00:00 inetd

now try this:
    kill -HUP 103 (substitute the process ID you got above)

You just restarted inetd without have to reboot.

If you want to kill something by name (be carful if more that one process has the same name) without looking up the process ID, you can use 'killall' as in:
    killall -HUP inetd

How do I enable ftp services on my host PC?

To allow ftp services on a Redhat Linux PC, edit the file /etc/xinetd.d/wu-ftpd and change the last line from:
    disable = yes
to
    disable = no


31-Dec-2003: jlackey - update information related to the root file system
16-Aug-2002: jlackey
04-Feb-2005: jmalone - Reference updated infor for Debian-based roots

Edited by - adrian on 27 Dec 2007 15:25:11

jmalone

61 Posts

Posted - 04 Feb 2005 :  11:51:43  Show Profile  Email Poster
If you are using a Debian-based root filesystem:

Telnet:

In the Debian-based root filesystems, telnet is not supported. If possible, you should use SSH instead as it provides a secure login session, as well as X11 forwarding.

If you require telnet support, you will need to add telnetd to your root filesystem. Consult http://packages.debian.org/ for a telnet server.


FTP:

In the Debian-based root filesystems, an ftp server is present but not enabled by default.

To enable the FTP server, edit the file /etc/inetd.conf and uncomment the line for the ftp service. You must then start the inetd service by running /etc/init.d/inetd start.
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000