Find the answer to your Linux question:
Results 1 to 9 of 9
I'm running Knoppmyth at home. Whenever I attempt to ssh into the box ssh myuserid@IP.AD.DR.ESS my terminal session hangs for a long time. Then, one of two things happens: 1) ...
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    6

    Can't Login using SSH

    I'm running Knoppmyth at home. Whenever I attempt to ssh into the box

    ssh myuserid@IP.AD.DR.ESS

    my terminal session hangs for a long time. Then, one of two things happens:

    1) Most of the time, I get a response "Write failed: Broken pipe" and go back to a command line.
    2) Sometime, I get a request for a password. After I type it in and hit enter, I am told that"

    Connection closed by IP.AD.DR.ESS

    Newbie that I am, I don't know what log files to check on the machine to find indicators of the problem.

    Can anyone tell me where to look to ID the error on the server side and advice on what I might do about it?

    Thanks for your help.

    Gary

  2. #2
    Linux Newbie sdimhoff's Avatar
    Join Date
    Jan 2007
    Posts
    191
    Hmm, I can't say I recognize exactly what the problem is, but I have a couple of questions for you.

    1.) Are you sure that you've configured your /etc/ssh/sshd_config file correctly. If you are getting to your computer, the authentication may not be set up correctly to actually let you in. Although I would think the error messages would be different if that were the case.

    2.) If you are behind a router and on a network, have you tried to connect to the machine via ssh INSIDE your network?

    The reason I ask this has to do with connection speed. Normally this shouldn't be any issue, but I find it odd that you are obviously connecting to your computer but it is hanging for a long time. To check the speed of the connection you should try pinging it. If your latency is very high then your sshd server may be kicking it?

    3.) Also, are either you or your linux box behind a firewall that could be messing with the connection?
    Linux since: 2001
    Gentoo since: 2004
    - - - - - - - -
    Translation:
    I fix things until they break.

  3. #3
    Just Joined!
    Join Date
    Jan 2008
    Location
    Singapore
    Posts
    4
    Are you trying to ssh from another machine or you local machine.

    Can you frist try to see if you can SSH from the local machine.
    That will confirm that your SSH server is working fine locally.

    Hope that helps.

  4. #4
    Just Joined!
    Join Date
    Jan 2008
    Posts
    6
    Thank you both so much for your help on this.

    Are you sure that you've configured your /etc/ssh/sshd_config file correctly.

    The file hasn't been touched since I set up the box. And until this, I had been using SSH freely for most of a year. The problem is recent and the time stamp on the file is from 12/2006. So, I assume it is OK.

    If you are behind a router and on a network, have you tried to connect to the machine via ssh INSIDE your network?

    Thanks for pointing this out. I should have said so up front. I am inside my network along with the Linux/Knoppmyth box.

    Also, are either you or your linux box behind a firewall that could be messing with the connection?

    My Linux box and I are on the same network. I can ping it and get a very fast response. There is no firewall between us. I should experiment with a crossover cable. I'll try to do that later. I don't believe our router could be messing with the connection.

    Are you trying to ssh from another machine or you local machine? Can you first try to see if you can SSH from the local machine.

    I am trying to ssh from my laptop (a Mac) into the Knoppmyth Linux box. I can successfully ssh from the laptop into other boxes without a problem.

    When, on the Knoppmyth box, I do

    ssh 127.0.0.1

    it works perfectly. But, if I try to ssh from the Knoppmyth box into another computer on our network, it takes a very long time to connect. Still, I can connect successfully. If I ssh to a server far off the network (say to our web site hosted somewhere in the midwest), it gets there much more quickly.

    After having rebooted the Knoppmyth box, I tried to ssh into it from various computers on our network. They all took a long time to get a response from the Knoppmyth box, as does my laptop (like 90 seconds). But, they would occasionally be able to log in.

    I hope all of this gives you guys some clues as to where I should look.

    Thanks again!

    Gary

  5. #5
    Just Joined!
    Join Date
    Jan 2008
    Location
    Singapore
    Posts
    4
    The fact that you can SSH from your local machine means the server set up is ok.

    Sounds like a network problem.

    You could use a cross wire and plug your laptop direct into the Knnopmyth Box to experiment the connection speed.

    Could you print the routing tables for your two machines and post the results.

    Login in root and capture output of the following commands

    #ifconfig

    #netstat -nr

    Secondly, if you have a hub, connect the SSH server and your laptop to it.
    Test the SSH and see how is the speed. That will confirm if your router/firewall is causing the long delay that you have mentioned.

    Good luck !

  6. #6
    Just Joined!
    Join Date
    Jan 2008
    Posts
    6

    It's the Network!

    I tried the crossover cable (I have a hub, but it's tough to get to).

    ssh got me in right away!

    Wow. Thanks!

    Any ideas on how I track down the network problem? I have tried to ssh to a third local computer from both the Knoppmyth box and from my laptop. Again, long lag. No login.

    In the next message, I'm posting the routing tables for my laptop and the Knoppmyth computer. Are they meaningful, now?

    Thanks!

    Gary

  7. #7
    Just Joined!
    Join Date
    Jan 2008
    Posts
    6

    Routing Tables

    Local Machine (laptop) ifconfig
    lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    inet 127.0.0.1 netmask 0xff000000
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
    gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
    stf0: flags=0<> mtu 1280
    en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULT ICAST> mtu 1500
    ether 00:11:24:36:c2:f8
    media: autoselect (none) status: inactive
    supported media: none autoselect 10baseT/UTP <half-duplex> 10baseT/UTP <full-duplex> 10baseT/UTP <full-duplex,hw-loopback> 100baseTX <half-duplex> 100baseTX <full-duplex> 100baseTX <full-duplex,hw-loopback> 1000baseT <full-duplex> 1000baseT <full-duplex,hw-loopback> 1000baseT <full-duplex,flow-control> 1000baseT <full-duplex,flow-control,hw-loopback>
    en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULT ICAST> mtu 1500
    inet6 fe80::211:24ff:fe8e:e8dc%en1 prefixlen 64 scopeid 0x5
    inet 10.10.12.114 netmask 0xffffff00 broadcast 10.10.12.255
    ether 00:11:24:8e:e8:dc
    media: autoselect status: active
    supported media: autoselect
    fw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULT ICAST> mtu 4078
    lladdr 00:11:24:ff:fe:36:c2:f8
    media: autoselect <full-duplex> status: inactive
    supported media: autoselect <full-duplex>

    Local Machine netstat -nr

    Routing tables

    Internet:
    Destination Gateway Flags Refs Use Netif Expire
    default 10.10.12.1 UGSc 25 31 en1
    10.10.12/24 link#5 UCS 2 0 en1
    10.10.12.1 0:f:b5:b:7c:da UHLW 25 13 en1 952
    10.10.12.3 0:1c:10:27:ae:25 UHLW 0 14 en1 1060
    10.10.12.114 127.0.0.1 UHS 0 0 lo0
    127 127.0.0.1 UCS 0 0 lo0
    127.0.0.1 127.0.0.1 UH 13 44110 lo0
    169.254 link#5 UCS 0 0 en1

    Internet6:
    Destination Gateway Flags Netif Expire
    ::1 link#1 UHL lo0
    fe80::%lo0/64 fe80::1%lo0 Uc lo0
    fe80::1%lo0 link#1 UHL lo0
    fe80::%en0/64 link#4 UC en0
    fe80::%en1/64 link#5 UC en1
    fe80::211:24ff:fe8e:e8dc%en1 0:11:24:8e:e8:dc UHL lo0
    ff01::/32 ::1 U lo0
    ff02::/32 ::1 UC lo0
    ff02::/32 link#4 UC en0
    ff02::/32 link#5 UC en1

    Server ifconfig

    eth0 Link encap:Ethernet HWaddr 00:191:72:1C:C5
    inet addr:10.10.12.3 Bcast:10.10.12.255 Mask:255.255.255.0
    inet6 addr: fe80::219:d1ff:fe72:1cc5/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:187832 errors:0 dropped:0 overruns:0 frame:0
    TX packets:129492 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:249031110 (237.4 MiB) TX bytes:31157954 (29.7 MiB)
    Base address:0x30e0 Memory:5a200000-5a220000

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:40 errors:0 dropped:0 overruns:0 frame:0
    TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:3253 (3.1 KiB) TX bytes:3253 (3.1 KiB)

    Server netstat -nr
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    10.10.12.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    0.0.0.0 10.10.12.1 0.0.0.0 UG 0 0 0 eth0

  8. #8
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Quote Originally Posted by noob_for_life View Post
    I tried the crossover cable (I have a hub, but it's tough to get to).

    ssh got me in right away!

    Wow. Thanks!

    Any ideas on how I track down the network problem? I have tried to ssh to a third local computer from both the Knoppmyth box and from my laptop. Again, long lag. No login.

    In the next message, I'm posting the routing tables for my laptop and the Knoppmyth computer. Are they meaningful, now?

    Thanks!

    Gary
    Erm, sorry if I am hitting at the obvious and stupid thing, but I have to ask it just in case: have you tried to change the wire for that box?

    1.- The rest of the boxes in your network do work ok.
    2.- You can ssh from or to anywhere, except that box.
    3.- But that box connects ok when you used another cable.

  9. #9
    Just Joined!
    Join Date
    Jan 2008
    Posts
    6
    Quote Originally Posted by i92guboj View Post
    Erm, sorry if I am hitting at the obvious and stupid thing, but I have to ask it just in case: have you tried to change the wire for that box?

    1.- The rest of the boxes in your network do work ok.
    2.- You can ssh from or to anywhere, except that box.
    3.- But that box connects ok when you used another cable.
    Great observation. But, I don't think it's the cable. I neglected to mention this before. But, I also would try to ssh from the Myth box to a computer off of my network. That went quickly.

    The problem is now fixed. I don't know why. I started fiddling with lots of stuff, purging junk on the hard drive, checking the configuration on the router, minor tweaks to my wireless network. They were little things which I thought would have no effect. But, something did. I can now connect quickly.

    Thank you all for your help.

    gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...