Results 1 to 9 of 9

Thread: ssh Not connecting

  1. #1
    Join Date
    Apr 2009
    Beans
    5

    ssh Not connecting

    I have a server behind a netgear router. and I am tring to connect to the server(boxA) from machine B, but when I type ssh boxA it hangs. I have checked the iptables and nothing is found. I am able to use svn+ssh to connect, Putty connects. No other computers connects to boxA. Any ideas????

  2. #2
    Join Date
    Aug 2007
    Location
    US
    Beans
    929
    Distro
    Ubuntu Development Release

    Re: ssh Not connecting

    Try:
    Code:
    ssh -vv boxA
    see what it says.
    Please mark completed threads as [SOLVED], which lets us find solutions faster!

  3. #3
    Join Date
    Mar 2008
    Location
    Connecticut
    Beans
    940
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: ssh Not connecting

    Quote Originally Posted by tbear55387 View Post
    I have a server behind a netgear router. and I am tring to connect to the server(boxA) from machine B, but when I type ssh boxA it hangs. I have checked the iptables and nothing is found. I am able to use svn+ssh to connect, Putty connects. No other computers connects to boxA. Any ideas????
    Do you have an account on boxA?

    Bill
    Ubuntu 10.04-Server: HP Pavilion: AMD Athlon 3200; 2gb RAM; GeForce4 MX - nForce; 160gb HDD; 1TB eSATA External HDD | Ubuntu 10.04: Dell D600; Intel Pentium M 1600 MHz; 2gb RAM; ATI Radeon 9000 (RV250); 60gb HD | Ubuntu User #24614

  4. #4
    Join Date
    Apr 2009
    Beans
    5

    Re: ssh Not connecting

    Sorry about that I ran a command and it took down the server all night - oops!
    OpenSSH_4.3p2, OpenSSL 0.9.8b 04 May 2006
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Applying options for *
    debug2: ssh_connect: needpriv 0
    then hangs

  5. #5
    Join Date
    Apr 2009
    Beans
    5

    Re: ssh Not connecting

    Okay after trying again here is some more of what I recieved:
    OpenSSH_4.3p2, OpenSSL 0.9.8b 04 May 2006
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Applying options for *
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to xx.servername.xx [xx.xx.xx.xx] port 22.
    debug1: connect to address xx.xx.xx.xx port 22: Connection timed out
    ssh: connect to host xx.servername.xx port 22: Connection timed out

    i have checked the router and it forwards to the server. I am able to connect using programs like putty just not from command line or using tools like sftp or scp or ssh from command line

  6. #6
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    6,314
    Distro
    Xubuntu Development Release

    Re: ssh Not connecting

    Let's make sure it is trying to connect.
    While SSH is trying to connect, i.e. before it says Connection timed out, run this command from another shell:
    netstat -tn
    and see if you can see a connection to the server in question port 22 in the SYN_SENT state. If not, then for some reason SSH isn't really trying to connect. If the entry is there, then suspect router forwarding not being right, or a firewall issue.

  7. #7
    Join Date
    Apr 2009
    Beans
    5

    Re: ssh Not connecting

    I went and typed ssh to box A from box B; boc B states it is trying to connect, I then netstat -tn and found SYN_SENT.

  8. #8
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    6,314
    Distro
    Xubuntu Development Release

    Re: ssh Not connecting

    Then it must be a port forwarding problem so the router isn't actually forwarding port 22 properly, a firewall blocking the connection, or a plain routing problem where B can't each a at all. If your request was getting through (and replies getting back) you would quickly either get the connection accepted. Or rejected if SSH wasn't listening.

    SYN_SENT means the connection request has been sent but no response received yet.

  9. #9
    Join Date
    Apr 2009
    Beans
    5

    Re: ssh Not connecting

    Thanks you for your help. I will look down that path and see what I can find out. Many thanks.

Bookmarks

Posting Permissions

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