We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


telnet/ftp is slow

Medium Priority
Last Modified: 2012-05-05

I use Debian as Linux server and I run ftpd on it.

Then from Windows machine I telnet or ftp to this debian server,
everytime when I logon, it is always slow, takes about 1 minute before
it prompts me to input username and password.

Also, when I put/get files thru ftp, seems it is slow.

I guess something is wrong with the configuration?
Or maybe Linux does this intentionally for security reasons?

Anybody helps me? thanks
Watch Question

Check the DNS configuration on the Linux server.

ftping on any account or a specific account?
A useful way to diagnose this is to monitor what's happening remotely via ethereal (i.e.
logging in may be causing nfs mounts, which may time out or something else surprising).

If it is slow to connect through telnet and it seems ok once you get connected, that's typically something wrong with DNS configuration. Just saw you also mentioned the get/put also seems slow after gets connected, you may want to investigate the more on network side.
Gabriel OrozcoSolution Architect

I agree with noonday

also please check

a) the wire. both from client to hub/switch, and the one from linux to hub/switch it should be a CAT5 wire.
b) the lan card. if it is failing it will throw many irq and other problems to the /var/log /messages or /var/log/syslog logs
c) the speed. just check if your card is 100mbits or 10mbits. with a simple ifconfig you should be able to see.


Whats the FTP deamon you are using? also I would suggest removing the telnet deamon and replacing it
with the ssh deamon, the reason for this is because telnet is insecure.
Also check to see that you not mixing duplexing between the switch/hub and both machines.  I've seen exactly what you're describing before.  This day and age everything should be full duplex, on linux you can probably use either mii-tool or mii-diag to see what duplex you're using.
Gabriel OrozcoSolution Architect

well... full duplex can only be used if you are using switches. hubs simply doesn't support it.

but if you can, as sheetbird says, go full duplex. not having it, it's like having a car but keep using a bicicle instead =)

the debian machine doesn't know the hostname of your windows machine and is trying to look it up in DNS.  If you put the windows machine name
in the debian machine's /etc/hosts file, like this:     windowsmachinename

then the one-minute lag after logging in should stop.

You can find out the windows hostname by opening a dos command box and typing
ipconfig /all
and look for the hostname line.



Thanks for your comments. Maybe I did not explain the problem clearly. Okay, here we go.  
My debian machine is and my Windows XP machine is,
subnet mask is, so they are in the same subnet, I think there is no need
for DNS or Gateway, right?  Below is what happened when I tried to telnet to Debian machine
from my Windows XP machine:

$ telnet -l jsmith
Connected to
Escape character is '^]'.
-----------HERE, IT WAITED for 20 seconds before promts for password----------
Password: ******
Last login: Mon Apr  3 04:56:33 2006 from on pts/0
Linux debian.home.com 2.4.27-2-386 #1 Mon May 16 16:47:51 JST 2005 i686 GNU/Linu

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
No mail.

What puzzles me is that why it waited for so long (20 seconds) before prompting
for password??? The debian "deb file" I used to install this telnet daemon is
telnetd_0.17-29_i386.deb which I downloaded from http://packages.debian.org/stable/net/telnetd


BTW, forgot to mention, these two machines are just my home PCs
and they are just connected thru a hub, very simple & straightforward,
no complicated networking here.


The debian machine waited so long because it was trying to find the name of the machine you were logging into.  After a timeout period it gives up and lets you log in.  Doesn't matter if the machines are on the same subnet or not - that's irrelevant to name lookup.  You see the line

Last login: Mon Apr  3 04:56:33 2006 from on pts/0

that would normally have the DNS name of your windows machine.  Try what I told you and see if that doesn't make the lag go away.
And you didn't give the IP addresses first time, I was just guessing what the IP addresses were.  S So what you do is put in the debian machine /etc/hosts file   windowsmachinename

substituting what you see under hostname when you do ipconfig /all on the windows machine for the word 'windowsmachinename'.

Next time you telnet in you should get logged in right away.  If it doesn't work, post the output of ipconfig /all from the windows machine, and the contents of /etc/hosts and /etc/resolv.conf from the debian machine.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Gabriel OrozcoSolution Architect

Problem is correctly described by kiffney. teknet daemon is allowing you to login only *after* the timeout trying to resolve your ip address to a domain name.

solution can be a little more tricky, in my experience.

this is becase *maybe* you have your debian to resolve first using dns, and if timeout, then hosts file.

if you want to change this, edit the file /etc/host.conf to have something like
multi on
order hosts,bind

so you know telnetd will try to reslv first using hosts, and only if t fails, try bind (dns system)

if you have that, then you should do what kiffney wrote in his previous post


Great, I did what kiffney told me to do, and it worked!

Just add one line in /etc/hosts, that's it!

Also thanks other guys who posted comments.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.