telnet / telnetd

Greetings to the community.

I would appreciate a tip on how to launch the telnet service. It …mostly…
works, however not quite.

In my boot image I launch “inetd”. In the /etc/inetd.conf file I have just
two entries, one for ftp and one for telnet. Ftp works fine. The entry for
telnet is:

telnet stream tcp nowait root /proc/boot/telnetd in.telnetd -Q -n

When a remote host attempts to telnet, it never gets a login window; it
hangs. The process status on the embedded PC shows the following command:

login -h 192.168.0.2 -p

I’m guessing the I haven’t instantiate a login shell correctly, or missing
something simple. This being my first project with QNX Neutrino, any
suggestions would be appreciated.

Here are parts of my build script:


[+script] startup-script = {

Start up some consoles

devc-con -n4 &
reopen /dev/con1
display_msg Welcome to Neutrino DiskOnChip!




\

Some common servers

pipe &
mqueue &
devc-pty &

starup network services to FTP will work

inetd

\

startup our app

ksh -c “startup.ksh &”

\

Start some extra shells on other consoles

reopen /dev/con2

[+session] sh &

reopen /dev/con3

[+session] sh &

Start a high priority shell just in case…

reopen /dev/con4

[pri=25 +session] sh &



\

Start the main shell

reopen /dev/con1
[+session] sh

[+session] login -p

}


\

for launching the Ethernet

io-net

\

network services

inetd
telnet
telnetd
ftpd
tftpd
ftp




Regards,

Steve Wagner

Steve Wagner wrote:

Greetings to the community.

I would appreciate a tip on how to launch the telnet service. It …mostly…
works, however not quite.

In my boot image I launch “inetd”. In the /etc/inetd.conf file I have just
two entries, one for ftp and one for telnet. Ftp works fine. The entry for
telnet is:

telnet stream tcp nowait root /proc/boot/telnetd in.telnetd -Q -n

When a remote host attempts to telnet, it never gets a login window; it
hangs. The process status on the embedded PC shows the following command:

login -h 192.168.0.2 -p

I’m guessing the I haven’t instantiate a login shell correctly, or missing
something simple. This being my first project with QNX Neutrino, any
suggestions would be appreciated.

Here are parts of my build script:


[+script] startup-script = {

Start up some consoles

devc-con -n4 &
reopen /dev/con1
display_msg Welcome to Neutrino DiskOnChip!




\

Some common servers

pipe &
mqueue &
devc-pty &

starup network services to FTP will work

inetd

\

startup our app

ksh -c “startup.ksh &”

\

Start some extra shells on other consoles

reopen /dev/con2

[+session] sh &

reopen /dev/con3

[+session] sh &

Start a high priority shell just in case…

reopen /dev/con4

[pri=25 +session] sh &



\

Start the main shell

reopen /dev/con1
[+session] sh

[+session] login -p

}


\

for launching the Ethernet

io-net

\

network services

inetd
telnet
telnetd
ftpd
tftpd
ftp




Regards,

Steve Wagner


\

I’m not into the embedded stuff with QNX, but in RTP, i would guess it’s
trying to resolve your ip, which maybe isn’t resolvable and telnetd
usually hangs for some time, i think there was a option to disable this,
not sure though.
Try waiting a while see if it shows up. if it do, try either locating
that option or add your ip into the /etc/hosts file.

/Johan

Hi Steve…

How do you start the io-net server? You should do something like:

tcp/ip with a NE2000 Ethernet adaptor

io-net -dne2000 -pttcpip if=ndi0:10.0.1.172 &
waitfor /dev/socket

You should change the ne2000 for the ethernet device of your board.

also, you have to include files from the /etc directory such as:

[data=copy] # All executables that can be restarted

go below.

/etc/services = {
ftp 21/tcp
telnet 23/tcp
finger 79/tcp
pdebug 8000/tcp
}

/etc/inetd.conf = {
ftp stream tcp nowait root /bin/fdtpd fdtpd
telnet stream tcp nowait root /bin/telnetd telnetd
finger stream tcp nowait root /bin fingerd
pdebug stream tcp nowait root /bin/pdebug pdebug -
}

and similarly you should include:

/etc/passwd
/etc/systems <<=== [ include every thing ]
/etc/hosts
/etc/services
/usr/local/terminfo
/etc/termcap

Now, if you have an ethernet device that uses devn-pcnet.so, then you
should be aware that I have had problems with this chip and remote
telnet.

Regards…

Miguel.

Steve Wagner wrote:

Greetings to the community.

I would appreciate a tip on how to launch the telnet service. It …mostly…
works, however not quite.

In my boot image I launch “inetd”. In the /etc/inetd.conf file I have just
two entries, one for ftp and one for telnet. Ftp works fine. The entry for
telnet is:

telnet stream tcp nowait root /proc/boot/telnetd in.telnetd -Q -n

When a remote host attempts to telnet, it never gets a login window; it
hangs. The process status on the embedded PC shows the following command:

login -h 192.168.0.2 -p

I’m guessing the I haven’t instantiate a login shell correctly, or missing
something simple. This being my first project with QNX Neutrino, any
suggestions would be appreciated.

Here are parts of my build script:

[+script] startup-script = {

Start up some consoles

devc-con -n4 &
reopen /dev/con1
display_msg Welcome to Neutrino DiskOnChip!

Some common servers

pipe &
mqueue &
devc-pty &

starup network services to FTP will work

inetd

startup our app

ksh -c “startup.ksh &”

Start some extra shells on other consoles

reopen /dev/con2

[+session] sh &

reopen /dev/con3

[+session] sh &

Start a high priority shell just in case…

reopen /dev/con4

[pri=25 +session] sh &

Start the main shell

reopen /dev/con1
[+session] sh

[+session] login -p

}

for launching the Ethernet

io-net

network services

inetd
telnet
telnetd
ftpd
tftpd
ftp

Regards,

Steve Wagner

my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com