[Help]Putty error: connection refused

Discussion in 'Site & Server Administration' started by KrAzZyBoy, Sep 19, 2010.

  1. #1
    Hello,
    I am unable to login on server by putty,. It shows network error:connection refused
    What would be the problem?
    I tried to login by port 22
    that may be the port problem
    What is the way to login on server by ssh entering the correct port?
    I tried by rescue mode,but i got login,but it was in vain(i am unlabe to edit iptables config, changed port from 2 to any other port,but still error is coming)
    Actuly my server administrator is on leave. He done some changes on server

    thank you
     
    KrAzZyBoy, Sep 19, 2010 IP
  2. [HB]Rob

    [HB]Rob Peon

    Messages:
    76
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    He probably changed the SSH port, which is by default 22, but most people change it for security reasons...
     
    [HB]Rob, Sep 19, 2010 IP
  3. ramnet

    ramnet Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    # netstat -natp | grep ssh | grep LISTEN

    Running this command should reveal what port your ssh daemon is listening on (assuming it's running).

    You might also try:

    # service sshd stop; service sshd start

    To restart the ssh daemon in case it stopped running for some reason.
     
    ramnet, Sep 20, 2010 IP
  4. AnthonyG

    AnthonyG Well-Known Member

    Messages:
    114
    Likes Received:
    3
    Best Answers:
    2
    Trophy Points:
    135
    #4
    @ramnet how would he do a netstat on a server he can't log into?

    @KrAzZyBoy if you PM me your domain name, ill tell you what port ssh is running on as long as your server admin didnt lock down ssh, either via a hosts.allow/hosts.deny or via iptables.
     
    AnthonyG, Sep 21, 2010 IP
  5. ramnet

    ramnet Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Read his post more carefully next time - he can login, just not via ssh.
     
    ramnet, Sep 21, 2010 IP
  6. theblight

    theblight Peon

    Messages:
    246
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #6
    if this doesn't work, try editing your firewall entry to allow port 22 to passthrough.
    with this command "setup" if this is linux
     
    theblight, Sep 24, 2010 IP