LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-28-2012, 02:14 AM   #1
angelo.c
Member
 
Registered: Jul 2011
Location: Hong Kong
Distribution: Slackware 13.1,CentOS 6.4,Fedora 16
Posts: 56

Rep: Reputation: Disabled
Slow ssh connection


Hello,everyone!

I open the ssh connection from my server and I constantly experience slow connection from my end to the server.When I typed some command in the putty console, the character seems like lagging for a few seconds and appeared.

My server loading is light and I don't know what is the cause.Is it that the server is behind my router?

Please drop me a line if you have any ideas.
 
Old 03-28-2012, 04:08 AM   #2
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
If the connection is taking too much time to take session then it means the network is slow and after getting a ssh connection if you are facing trouble it means the machine you are trying to connect is having performance issues.

so check the performance of the client machine you are trying to connect if you get the same problem while working directly on it.
 
Old 03-28-2012, 08:07 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,348

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
You could try the traceroute cmd http://linux.die.net/man/8/traceroute to get some actual figures.
Simple example
Code:
traceroute ip.of.the.server
 
Old 03-30-2012, 02:57 AM   #4
MattSong
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Rep: Reputation: Disabled
check if you have nameserver set, ssh need Reverse resolution, when you dont have nameserver aviliable, it will take a long time to wait for timeout.
 
Old 03-30-2012, 03:25 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Can you ssh into the server on the same LAN as the server?

Try "ssh -C user@server". If that speeds things up, that could indicate a slow network connection.
If you used "ssh -X user@server", there may be a problem with there not being a dbus session.

If the problem is with a second ssh session, here is how you can use the same tunnel for multiple sessions:
create a ~/.ssh/config file with these contents:
Code:
Host *
        ControlMaster auto
        ControlPath ~/.ssh/control-master/%r@%h:%p
Create the control-master directory:
mkdir ~/.ssh/control-master

This will speed up making new connections.

Since you are going through a router (from outside the server's network I presume), the problem could be due to buffer bloat.
http://www.coverfire.com/archives/20...y-experiments/

Last edited by jschiwal; 03-30-2012 at 03:31 AM.
 
Old 03-30-2012, 04:57 AM   #6
angelo.c
Member
 
Registered: Jul 2011
Location: Hong Kong
Distribution: Slackware 13.1,CentOS 6.4,Fedora 16
Posts: 56

Original Poster
Rep: Reputation: Disabled
Thanks everyone!Those information are very useful.

Actually,my traceroute is about 12 hops. I guess it shouldn't be a problem.

This issue is not going to happen if I am at home (in LAN).

jschiwal,I'm going to look at your website to see whether this is the problem.

Thanks all for helping out.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SVN +SSH + SMB connection is slow jazee Linux - Networking 0 05-19-2008 03:01 PM
frequently slow ssh connection heriL Linux - Networking 1 03-23-2008 05:25 AM
SLOW SSH connection adriaanbw Linux - Networking 1 04-27-2006 06:13 PM
ssh connection is very very slow. bruse Linux - Networking 1 01-19-2006 05:43 AM
my PuTTY connection over ssh is too slow. chris.pickett Linux - Networking 2 11-22-2003 02:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration