Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't Telnet or FTP but can ping the server

Status
Not open for further replies.

squirel

Programmer
Feb 24, 2000
4
GB
I'm having trouble connecting the my linux server from a win95 machine. I can ping the server but can't connect via telnet or ftp. When I try to connect via telnet I get a message saying 'Disconnected by host' before I get a chance to enter a user or password to login.<br>
<br>
I have tryed to connect to localhost on the server I get the following message:<br>
<br>
#telnet localhost<br>
Trying 127.0.0.1<br>
Connected to localhost<br>
escape character is '^]'<br>
Connection closed by foreign host.<br>
<br>
With ftp, I get to enter the User/Password but then get the message 'Incorrect Login'. I'm not connecting as root or anything like that.<br>
<br>
Can anyone help?
 
Are you using tcpwrappers? Check your hosts.allow and hosts.deny file, make sure you have an entry for 127.0.0.1 and your Win95 machine in hosts.allow and neither are in your hosts.deny file.<br>
<br>
For the FTP problem, also check that the user name you are trying to connect as is not in the /etc/ftpusers file.<br>
<br>
Also, do you have any firewall rules setup with regards to telnet?<br>
<br>
I would check the firewall rules, hosts.deny and hosts.allow, check any config files for the FTP server you are using to ensure you are allowing normal user logins (can you log in anonomous???).<br>
<br>
What version of FTP are you running, are you starting it through inetd.conf, what are the flags you are using when starting it and in.telnetd from inetd.conf?<br>
<br>
Hope this helps,<br>
Paul Kincaid
 
I have tried putting the entries for both localhost and the Win95 machine in the hosts.allow file. I have now given open access through hosts.allow with the line ALL: ALL: ALLOW and removed all entries from hosts.deny, but this makes no difference. In the inetd.conf file there are no command line flags for ftpd or telnetd.<br>
<br>
I can ftp as anonymous locally but not remotely. Do you know of any other files I should look at.<br>
<br>
Thanks.
 
Try setting up a different IP like 192.0.0.10 and then connect using the IP instead of the local host name. Once the IP is set, try pinging yourself. If it works, try telnet, should work fine.
 
Quick note about pinging yourself - some Unix implementations, and maybe Linux, will not actually send a ping over the network if it detects that the ping address is your local host. You'll get a &quot;localhost is alive&quot; type message, but it doesn't tell you that you can talk to the network OK - just that your network card is working.
 
Alright, sorry I couldn't get back sooner....<br>
<br>
Try killing inetd, then starting in.telnetd from the command line -- &quot;in.telnetd -debug 23&quot; (have to have the debug and port number to start from the command line)<br>
<br>
That will bypass the tcpwrappers to see if its an authentication issue -- I would recommend only doing this temporarily just to check to see if it works then killing in.telnetd since you have no tcpwrappers protection while you are doing that.<br>
<br>
Hope this helps,<br>
Paul Kincaid
 
Doohhhh....<br>
<br>
It's a bit embarrassing really.<br>
<br>
I started to 'smell a rat' when I couldn't find in.telnetd in the /usr/sbin directory. It appears that the package was not automatically installed, even though I explicitly selected it in the installation procedures ( everything was setup apart from in.telnetd not being present). The FTP problem was caused by me messing about with the ports in a vain atempt to solve the problem and forgetting to reset the inetd.conf file. pmkincaid, thanks for your reminder in your last mail.<br>
<br>
PS. I'm not very impressed with the Macmmillan distribution of Red Hat linux 6.5. It's supposed to be simple to install...well it is if you select one of the typical installation but if you try to customise your install you run into problems, like the installation totally crashing. Try to avoid this one if possible.<br>
<br>
Thanks to all, for your help (problems solved).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top