View topic - problem with telnet

problem with telnet

anything that doesn't fit to other groups.

problem with telnet

Postby raohansikarao » Wed Mar 03, 2010 8:30 am

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?
raohansikarao
Active Member
 
Posts: 34
Joined: Thu Feb 25, 2010 4:25 am

Postby Tim » Wed Mar 03, 2010 3:22 pm

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
Tim
Senior Member
 
Posts: 1466
Joined: Wed Mar 10, 2004 12:28 am

Postby raohansikarao » Mon Mar 08, 2010 7:38 am

it is from windows to qnx
raohansikarao
Active Member
 
Posts: 34
Joined: Thu Feb 25, 2010 4:25 am

Postby xtang » Mon Mar 08, 2010 1:39 pm

devc-pty not running?
xtang
QNX Master
 
Posts: 313
Joined: Thu Jul 18, 2002 5:01 pm

Postby raohansikarao » Tue Mar 09, 2010 1:01 pm

ya devc-pty is running but login process is not running (i verify using pidin command)
raohansikarao
Active Member
 
Posts: 34
Joined: Thu Feb 25, 2010 4:25 am

Postby Tim » Tue Mar 09, 2010 2:25 pm

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
Tim
Senior Member
 
Posts: 1466
Joined: Wed Mar 10, 2004 12:28 am

Postby raohansikarao » Wed Mar 10, 2010 7:17 am

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
raohansikarao
Active Member
 
Posts: 34
Joined: Thu Feb 25, 2010 4:25 am

Postby Tim » Wed Mar 10, 2010 2:10 pm

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
Tim
Senior Member
 
Posts: 1466
Joined: Wed Mar 10, 2004 12:28 am

Postby raohansikarao » Fri Mar 19, 2010 10:51 am

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
raohansikarao
Active Member
 
Posts: 34
Joined: Thu Feb 25, 2010 4:25 am

Postby xtang » Mon Mar 22, 2010 1:42 am

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.
xtang
QNX Master
 
Posts: 313
Joined: Thu Jul 18, 2002 5:01 pm


Return to General Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron