Summary Telnet Question

From: Chetan Ramanna (chetan@sgsn01.nmg.sms.siemens.com)
Date: Wed Jun 17 1998 - 17:10:33 CDT


Thanks to everyone who responded
The problem was solved when I checked the inetd.conf file and checked the tcp and ftp lines in the file were commented.
I removed them and restarted and everything worked fine
Thanks to everyone again.

Orig Question

I have a Sparc 2 running on SunOS 4.1.4
When I telnet to that machine I get the following message

"telnet machine1
Trying 154.223.12.67 ...
Connected to machine1.
Escape character is '^]'.
Connection closed by foreign host."

I am not able to telnet to that machine.
But if I do rlogin machine1 I get the password prompt and then I can go into that machine.
How do I fix that machine so that I can telnet to that machine.

Also if I ftp to that machine1 I get the following error message.

"Connected to machine.
421 Service not available, remote server has closed connection"

I can't ftp to that machine1 either.
How do I fix these problems.

Thanks
Will summarize right this time.
-----------------------------------------------

replies were as follows
--------------------------------

check you /etc/inetd.conf to make sure that telnet and ftp is not
commented out. Check /etc/services to make sure they are not commented out
either (neither the tcp nor the udp ports) then restart the dameons.

make sure they are running on the standard ports as well. can you run
ssh??

Eric

On Wed, 17 Jun 1998, Chetan Ramanna wrote:

>
>
> Hi Gurus,
>
> I have a Sparc 2 running on SunOS 4.1.4
> When I telnet to that machine I get the following message
>
> "telnet machine1
> Trying 154.223.12.67 ...
> Connected to machine1.
> Escape character is '^]'.
> Connection closed by foreign host."
>
> I am not able to telnet to that machine.
> But if I do rlogin machine1 I get the password prompt and then I can go into that machine.
> How do I fix that machine so that I can telnet to that machine.
>
> Also if I ftp to that machine1 I get the following error message.
>
> "Connected to machine.
> 421 Service not available, remote server has closed connection"
>
>
> I can't ftp to that machine1 either.
> How do I fix these problems.
>
> Thanks
> Will summarize right this time.
>
>
>
>
>
> Chetan Ramanna
> Off # (847) 304-7383
> Fax # (847) 304-7713
> <mailto:chetan@sgsn01.nmg.sms.siemens.com>
>
>
>

Eric D. Pancer
  Outlook Technologies, Inc.
 eric@unique.outlook.net
   http://www.outlook.net/~eric
---------------------------------------------------------------

The machine you are telnetting from is failing reverse-name dns lookup.
A pointer needs to be created (or corrected) for your box that matches the
A record associated with it.

Ken

--------------------------------------------------------

> "telnet machine1
> Trying 154.223.12.67 ...
> Connected to machine1.
> Escape character is '^]'.
> Connection closed by foreign host."
>
Sounds to me like you don't have a shell on that machine. Check the
/etc/passwd file.

> Also if I ftp to that machine1 I get the following error message.
>
> "Connected to machine.
> 421 Service not available, remote server has closed connection"
>
Check /etc/shells; make sure whatever is in /etc/passwd shell-wise is also
in this file.

Ackerson, Greg
-----------------------------------------------------------------------

I'd start by checking the entries for telnet and ftp in the /etc/inetd.conf
file.

You need to figure out whether these have been disabled entirely (there
will be a "#" comment mark in from of the line starting with in.telnetd) or
whether there some sort of tcp-wrapper. If your telnet entry looks like:

telnet stream tcp nowait root /usr/sbin/in.telnetd in.telnetd

then telnet is enabled (no comment mark at the beginning of the line) and
there are no tcp wrappers (the command is /usr/sbin/in.telnetd with an
argument of in.telnetd). If the line read something like:

telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd

then you'd be running tcp-wrappers. If this is the case, you need to read
the man pages on hosts.allow and hosts.equiv for information on how to
grant or deny access for a given service (telnet, ftp) and a given host.

If you change inetd.conf, you'll need to kill and restart inetd.

Also, you need to make sure that forward and reverse DNS are setup
correctly for the machine that you are using to initiate the telnet program.

Always check /var/adm/messages for reasons why you're denied. If it's not
logging messages, add:

daemon.debug /var/adm/messages

to your /etc/syslog.conf and then kill and restart syslog. (You may want
to get rid of this when you're done troubleshooting).

Hope this helps.

Joel

--------------------------------------------------------------

> I have a Sparc 2 running on SunOS 4.1.4
> When I telnet to that machine I get the following message
>
> "telnet machine1
> Trying 154.223.12.67 ...
> Connected to machine1.
> Escape character is '^]'.
> Connection closed by foreign host."

Do you have telnet configured in inetd.conf? I'm guessing you do, since
you're connecting and then getting dropped.

Hm... You're not out of ptys or something like that, are you?

I'll be interested in seeing your summary, at any rate... Good luck!

-- 
    Mason Loring Bliss  -=-  Support Thrall  -=-  nCipher, Inc.
mason@ncipher.com  mason@acheron.middleboro.ma.us  bsdboy@hotmail.com

----------------------------------------------------------------

I think your problem is with a firewalled machine that has ftp service disabled or using tcp wrappers that forbid specific set of addresses from connecting to their server using ftp service. Regards Amjad Zamil < amjadz@sts.com.jo >s

-------------------------------------------------------------------------

It sounds about "accepted shells" by the machine. Check the /etc/shells on the remote machine (machine1) and verify the /etc/shells file. It should contained the shells used by your users. Like :

--> cat /etc/shells /bin/csh /usr/local/bin/tcsh /usr/local/bin/bash

I hope that it will help you...

Bonne chance (Godd luck)!

Ciao!

Normand Ranger

``'`` CIRANO * (o O) Centre Interuniversitaire de * $$$$$$$ ._________ooO_(_)_Ooo________. Recherche en ANalyse des Organisations *$$ $ | Informaticien-statisticien | 2020 rue University, 25e etage, $$** | Sysadmin | Montreal (Quebec) Canada H3A 2A5 $$ ** | Co-webmestre | Tel: (514)985-4009 FAX: (514)985-4039 $$** |____________________________| *$$ $ E-mail: rangern@cirano.umontreal.ca * $$$$$$$ http://www.cirano.umontreal.ca/~rangern *

"Changement de corbillon fait trouver le pain bon" [A. de Montluc (1616)] --------------------------------------------------------------------------------

Looks like the telnet and ftp were taken out of the /etc/services file you are able to rsh probably because a .rhosts file and/or rsh not beeing turned off.

Val -----------------------------------------------------------------------------------------------------------------

Check /etc/inetd.conf to see if these services have been commented out. Also may want to check the binaries to ensure they have the correct permissions.

Cheers, Colin Melville Technology Partners

------------------------------------------------------------------------

Do you TCP_WRAPPERS installed? is in.telnetd running?? check out your /etc/hosts.[ deny/allow] and verify your IP is allowed in wit that service and make sure in.telnetd is running from /etc/inetd.conf. Let me know if this helps

Ryan

--------------------------------------------------------------------------------------------------

I would like to ask you to see the /etc/shells file at the remote machine. ************************************* /etc/shells is an ASCII file containing a list of legal shells on the system. Each shell is listed in the file by its absolute path name. For example:

/bin/ksh /bin/rksh /bin/tcsh /bin/csh /usr/bin/keysh /bin/sh /bin/rsh /bin/posix/sh /sbin/sh *************************************

or

could you log on remote machine and observe that inetd is running and in /etc/services file there are these services, you can use the "egrep" command:

egrep "ftp|tel" /etc/services /etc/inetd.conf

The result should be something similar this: /etc/services:ftp-data 20/tcp /etc/services:ftp 21/tcp /etc/services:telnet 23/tcp /etc/services:tftp 69/udp /etc/inetd.conf:# Ftp and telnet are standard Internet services. /etc/inetd.conf:ftp stream tcp nowait root /usr/sbin/in.ftpd in.ftpd /etc/inetd.conf:telnet stream tcp nowait root /usr/sbin/in.telnetd in.telnetd /etc/inetd.conf:# Tftp service is provided primarily for booting. Most sites run this /etc/inetd.conf:#tftp dgram udp wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot

*************************************

I hope it can help you.

Bye

Vera Alves Barros

-------------------------------------------------------------------------------------------------

SOmeone may have commented out the "ftp" and "telnet" entry in the /etc/inetd.conf file (or the telnetd and ftpd has been removed). If it's not commented out (and has no tcplogger wrapper), the you can start it simply by doing "kill -HUP <inetd pid>".

-- Joel Lee

(Opinions expressed here is just mine and no one else, not even my employer.)

Continuus Software Corp. joellee@continuus.com http://www.continuus.com

-----------------------------------------------------------------------------------------------------

check for /etc/hosts.allow and add your ip. Rlogin's are not wrapped. That would explain why you can rlogin to it, but not telnet.

Patrick

-------------------------------------------------------------------

maybe you are running tcp wrappers allowing inbound connections using login protocol and refusing telnet/ftp ?

check /etc/inetd.conf and /etc/hosts.allow and /etc/hosts.deny ---------------------------------------------------------------------------------------------------

I'm not certain if this is your problem, but some programs use getusershell(3C). If this function can't find the shell specified in shells(4) (or was it passwd(4)?) for the user, then it fails and the program aborts.

Anyway, I've seen this a couple of times. If this is the cause of your problem, then you can modify /etc/shells, or the passwd shell, or copy or create a link in the appropriate place to the required shell.

Hope this helps,

Rgds,

-H-

Harvey M Wamboldt ^ E-Mail: harvey@iotek.ns.ca MDA Inc 1000 Windmill Rd. Suite 60 ^ Fax: (902)468-2278 Dartmouth NS, B3B 1L7, Canada ^ Phone: (902)481-3531

-----------------------------------------------------------------------------------------

Check the files /etc/shells and /etc/ftpusers. Make sure inetd is running.

Bismark Espinoza

-----------------------------------------------------------------------------------------------------------

check out /etc/inetd.conf /etc/services and see if you have tcp_wrappers installed (presence of /etc/hosts.deny & /etc/hosts.allow are good telltales)

-- Dwight Petersen is a system administrator. Standard disclaimers.

"What if the songbird will not sing?" "Kill it," said Oda Nobunaga. "Make the bird want to sing", said Toyotomi Hideyoshi. "Wait", said Tokugawa Ieyasu. --------------------------------------------------------------------------------------------------

Could be one of a couple things :-

- Running tcp wrappers? This means only certain machines can telnet onto the box.

- telnetd been commented out of /etc/inetd.conf? This would prevent the service being available.

Regards,

Steve Kay steve@peachy.com

---------------------------------------------------------------------------------------------------------------

Chetan Ramanna Sr. Systems Administrator Siemens Medical Systems Off # (847) 304-7383 Fax # (847) 304-7713 <mailto:chetan@sgsn01.nmg.sms.siemens.com>



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:42 CDT