Find the answer to your Linux question:
Results 1 to 5 of 5
Hello, I have got server running gentoo and when I try to connect to SSH (port 22) using putty, I get error 'Connection refused' (ping works without problems). I tried ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2008
    Location
    Lithuania
    Posts
    4

    Connection Refused (gentoo)


    Hello,
    I have got server running gentoo and when I try to connect to SSH (port 22) using putty, I get error 'Connection refused' (ping works without problems). I tried to stop iptables
    Code:
    /etc/init.d/iptables stop
    but it doesn't help.
    Any solutions?
    Thanks a lot for answers, because I really need to fix that problem tomorrow

  2. #2
    Just Joined!
    Join Date
    Jun 2008
    Posts
    4
    Quote Originally Posted by Gediminas View Post
    Hello,
    I have got server running gentoo and when I try to connect to SSH (port 22) using putty, I get error 'Connection refused' (ping works without problems). I tried to stop iptables
    Code:
    /etc/init.d/iptables stop
    but it doesn't help.
    Any solutions?
    Thanks a lot for answers, because I really need to fix that problem tomorrow
    Do you have sshd running? Also you might want to run the iptables commands to list active filters and drop all filters.

  3. #3
    Linux User dxqcanada's Avatar
    Join Date
    Sep 2006
    Location
    Canada
    Posts
    259
    First check to see if sshd is listening on port 22:
    Code:
    # netstat -plt
    ... if not then start the daemon
    Code:
    # /etc/init.d/sshd start
    If sshd is listening on port 22 ... then you will need to check the /etc/ssh/sshd_config file for a hint.



    Men occasionally stumble over the truth,
    but most of them pick themselves up
    and hurry off as if nothing had happened.

    Winston Churchill


    ... then the Unix-Gods created "man" ...

  4. #4
    Just Joined!
    Join Date
    Jul 2008
    Location
    Lithuania
    Posts
    4
    That problem isn't only with SSH. Server refuses all connections from outside - HTTP, SSH and so on. I created /etc/hosts.allow and wrote "ALL:ALL, but it doesn't work. Also I droped all filters. And it doesn't work too

  5. #5
    Just Joined!
    Join Date
    Jul 2008
    Location
    Sweden, Earth, Milky way
    Posts
    10
    Make sure you don't have ALL:ALL in /etc/hosts.deny. That would overrule the hosts.allow (I found out the hard way :P )

Posting Permissions

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