View topic - problem with telnet

Page 1 of 1

problem with telnet

PostPosted: Wed Mar 03, 2010 8:30 am
by raohansikarao
Hello !!!

I want to connect a qnx image to a windows system , and when I connect it, the
system shows this error:

Trying 172.18.1.158 .....
Connected to 172.18.1.158
Escape charcter is '^]'.
telnetd: /bin/login: bad file descriptor
Connection closed by host.

Do you know why I have this problem, please?

PostPosted: Wed Mar 03, 2010 3:22 pm
by Tim
raohansikarao,

Are you having problems telneting from QNX to Windows or Windows to QNX? It's not clear which way you are trying to connect.

Tim

PostPosted: Mon Mar 08, 2010 7:38 am
by raohansikarao
it is from windows to qnx

PostPosted: Mon Mar 08, 2010 1:39 pm
by xtang
devc-pty not running?

PostPosted: Tue Mar 09, 2010 1:01 pm
by raohansikarao
ya devc-pty is running but login process is not running (i verify using pidin command)

PostPosted: Tue Mar 09, 2010 2:25 pm
by Tim
There you go then. You've answered your own question. Start the login process (you might want to check out the doc's on tinit).

Tim

PostPosted: Wed Mar 10, 2010 7:17 am
by raohansikarao
i started tinit as <tinit -p &> and login as <login &> in image

what my observations are when i am use telnet as below

#telnet xxx.xxx.x.xx
it is waiting so long time, when i press ENTER button "two times" then it showing login command
but when i try to login for first time it is not working but second time it is logging into qnx perfectly
i don't know what is happening and where i am doing wrong,please tell me why this is happening

PostPosted: Wed Mar 10, 2010 2:10 pm
by Tim
raohansikarao,

You don't need to start the 'login' process in your image. You just need to start the 'tinit' process.

Read the documentation on tinit. It explains exactly how to have tinit start the login process..

Tim

PostPosted: Fri Mar 19, 2010 10:51 am
by raohansikarao
i started tinit as <tinit &> in image script and included login file as below
#/bin/login=/bin/login

by pidin command i am able to see tinit and login both are running but when i use telnet from windows the same above problem is coming.....

In image what i am observed is tinit is in "nanosleep" state while in OS it is in "Reply" state i am thinking this may be the issue but i don't know how to solve this....please tell me what i have to do to avoid this problem

PostPosted: Mon Mar 22, 2010 1:42 am
by xtang
I don't believe tinit is involved here. (I could be wrong, it's been a while).

When you telnet into a machine, 1) the fact you have to wait a long time to see the "connected to ..." line, means you have a mis-configuration of DNS resolving on QNX side.

Once connected, inetd start telnetd, telnetd in turn open a tty/pty pair (thus devc-tty need to be there), telnetd will then spawn /bin/login on one side of the terminal, the fact you see "telnetd: /bin/login: ..." indicate /bin/login is spawed, but faild.

/bin/login involve a few other files, /etc/passwd, /etc/shadow, and probably /bin/sh are all important. You may want to check all these files exisit at the right place.