cancel
Showing results for 
Search instead for 
Did you mean: 

SSH is very slow,

SOLVED
Go to solution
samay_hcl
Advisor

SSH is very slow,

Can some one help me.
SSH is very slow.
/var/adm/wtmps is conteneously increasing.

-rw-rw-r-- 1 adm adm 195600 Feb 7 09:32 wtmps
-rw------- 1 root other 5589596 Feb 6 23:51 btmps
In syslog,

FTP LOGIN REFUSED (ftp not in /etc/passwd) FROM localhost [127.0.0.1], anonymous
FTP session closed
Data port : 20
7 REPLIES
sujit kumar singh
Honored Contributor
Solution

Re: SSH is very slow,

hi

can have a look at the folowing thread, this can be helpful.


http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1315390

sometimes purging wtmp and wtmpx might help.


regards
sujit
Jim Walls
Trusted Contributor

Re: SSH is very slow,

I don't know about your SSH problem but the syslog message suggests, to me, that access to FTP (a totally unrelated protocol) is being attempted.

SSH/SFTP/SCP usually use Port 22 - not Port 20. If it is, indeed, FTP that you require then you need to set up the ftp account and inetd.

On the other hand, one cause for slow connection using SSH could be that you don't have reverse IP information set up in your DNS... SSH does a reverse lookup in order to verify the connection and the DNS query can take up to 30seconds to timeout before the connection completes. A workaround is to put the necessary IP address information in /etc/hosts (and make sure "files" are consulted before "dns" in /etc/resolv.conf). The proper solution is to set up the DNS to provide the reverse lookup.
Kapil Jha
Honored Contributor

Re: SSH is very slow,

Can you check how many connections are open for ssh and/or ftp, from ur question it seems that ftp is a user.

u can use lsof command
lsof|grep -i ssh OR netstat -a|grep -i ssh

if number is very high try to restart the ssh service.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Jim Walls
Trusted Contributor

Re: SSH is very slow,

Correction! In my previous post, for /etc/resolv.conf... that should be /etc/nsswitch.conf.

It would be useful to have the output from:
uname -a
ssh -V

What client are you connecting from?

Sachin Kumbla
Frequent Advisor

Re: SSH is very slow,

you can empty the btmps file.you can take the backup of the same if required.
AVV
Super Advisor

Re: SSH is very slow,

Hi,

for slowness check your /etc/hosts and /etc/resov.conf file.

Did u try to restart the ssh service anytime ?
samay_hcl
Advisor

Re: SSH is very slow,

Thanks a lot for all your help.
issue resolve.