1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

connect to host xx.xx.xx.xx port 22: Connection timed out

Discussion in 'Site & Server Administration' started by usf, Feb 24, 2016.

  1. #1
    Hello,
    I have 2 servers; Server A and Server B. On both Centos 6.7 is installed. When I try to connect Server B from Server A its timeout.

    [root@s843 ~]# ssh
    ssh: connect to host xx.xx.xx.xx port 22: Connection timed out
    [root@s843 ~]#

    Is there any one that have solution from this.

    Looking forward for reply.
    Thank You.
     
    usf, Feb 24, 2016 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    Depends. How are these set up? Can you reach server A from server B? Can you reach server B from your home computer via SSH?
    Are they on the same network?
    There might be an issue connecting within the same network, but since you say nothing about how they're set up, it's hard to say.
     
    PoPSiCLe, Feb 24, 2016 IP
  3. usf

    usf Active Member

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #3
    They are on different networks. But both are online. I am unable to reach from Server A to Server B via SSH.
     
    usf, Feb 24, 2016 IP
  4. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #4
    Yes, you said so - what I was wondering was are you able to reach server B from another computer (NOT server A)? Given that they are on different networks, it shouldn't be anything like a redirect loop / NAT loop, so that should be out of the question.

    I'm assuming you're already connecting to server A via SSH from your home computer?
     
    PoPSiCLe, Feb 24, 2016 IP
  5. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #5
    I would recommend:
    • Checking/disabling firewalls on both machines to see if that is the issue.
      • The SSH port is often blocked as an outbound connection.
      • Server A may be blocked from connecting to server B by an iptables rule.
    • Ensure that SSH is listening on port 22 on server B.
    • As stated already (PoPSiCLe), can you connect to server B from a different location, for example your home?
    Chris
     
    RHS-Chris, Feb 24, 2016 IP
  6. olddocks

    olddocks Notable Member

    Messages:
    3,275
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    215
    #6
    I think your firewall is blocking you. Try to login from another different ip.
     
    olddocks, Mar 7, 2016 IP
  7. slackhead

    slackhead Member

    Messages:
    54
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #7
    It sounds like it's being refused because ssh is listening on a different port for ssh. Try putting ssh -P number name@ip to login.
     
    slackhead, Mar 8, 2016 IP