Results 1 to 3 of 3

Thread: port 22: Connection refused

  1. #1
    Join Date
    Jun 2008
    Location
    Chicago
    Beans
    202
    Distro
    Ubuntu 14.04 Trusty Tahr

    port 22: Connection refused

    I was using the ssh from my mac to my server and I rebooted the server
    and now I can't use ssh. I get this error


    ssh: connect to host 192.168.0.103 port 22: Connection refused

    ~$ sudo service ssh start
    start: Job is already running: ssh


    I also scan all ports and this and snap a screenshot.
    as you can see in the screenshot im blocking the rest of the port,
    just need ssh and http open.
    Attached Images Attached Images
    Last edited by Fertech; March 16th, 2012 at 12:30 AM.
    Fertech

  2. #2
    Join Date
    Apr 2009
    Location
    Hong Kong
    Beans
    91
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: port 22: Connection refused

    Do you have your configuration files set up correctly?
    My site about computing:
    http://miklcct.csproject.org/
    Be sure to see my photos!

  3. #3
    Join Date
    Sep 2011
    Location
    London
    Beans
    384

    Re: port 22: Connection refused

    I rebooted the server and now I can't use ssh. [...]
    Hello Fertech

    To me looks like there's no problem with port blocking or similar, but it does look like ssh isn't running, or isn't running properly. From the description, my guess is that it's not set to start correctly by your reboot, and previously you'd started it manually in a different way -- would that have been possible?

    On the server, check to see if the process is running:
    Code:
    $ ps ax | fgrep ssh
    1726 ?        Ss     0:00 /usr/sbin/sshd -D
    If it is, on the server, see if you can ssh to itself:
    Code:
    $ ssh localhost
    user@localhost's password: [...]
    If you can get in, then your problem is with networking, port filtering or similar. If you can't get in locally, then your problem is with ssh, which is what I'm guessing is happening. Try looking in your log files for any start up errors, in particular problems allocating the port.

    Look for this kind of thing in /var/log/auth.log
    Code:
    Dec 21 15:35:27 master sshd[1101]: Server listening on 0.0.0.0 port 22.
    Hope that's of some help isolating your problem.

    Kind regards,
    Jonathan.

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
  •