Announcement

Collapse
No announcement yet.

weird ssh problem [SOLVED]

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    weird ssh problem [SOLVED]

    I am running a new installation of Kubuntu on one of my machines, let's call it machine "X".
    I have identical sshd_config files on both machines. I can log in to machine Y from machine X, but not vice versa. I've tried changing the port to 222 instead of 22, and still nothing. I'm running ufw on both and have done a ufw accept 222 and 22 on both.

    I can connect from machine X to machine X, no problem. I can also connect from machine Y to other machines. It just looks like somehow my new machine is somehow blocking incoming ssh 's from other machines (once again, it accepts an 'ssh 127.0.0.1' no problem.

    Does anyone know what I'm not configuring right on the new install?
    Kurt

    #2
    Re: weird ssh problem

    Hi,

    could you please nmap machine X from Y.

    Distributor ID: Ubuntu
    Description: Ubuntu Trusty Tahr (development branch)
    Release: 14.04
    Codename: trusty

    Comment


      #3
      Re: weird ssh problem

      What shows up in /var/log/auth.log on X when you try to ssh to it?

      Comment


        #4
        Re: weird ssh problem

        absolutely nothing in auth.log.
        May 10 20:30:49 loki sshd[2556]: Server listening on 0.0.0.0 port 222.
        May 10 20:30:49 loki sshd[2556]: Server listening on :: port 222.


        The connection times out on my other machine too.
        when I do a -vv on that one it says "debug2: ssh_connect: needpriv 0" I'm not sure if that's important

        I've even tried:
        sudo iptables -P INPUT ACCEPT
        sudo iptables -P OUTPUT ACCEPT
        sudo iptables -P FORWARD ACCEPT

        sudo iptables -F # Comment (flushes all existing iptables chains)

        to ensure it isn't a firewall problem.


        Can you provide an example of how I'd use nmap?

        I found this message with a guy with a similar problem, but he never tells how he solved it as far as I can tell: https://lists.ubuntu.com/archives/ub...er/159532.html

        Comment


          #5
          Re: weird ssh problem

          OK, I did a apt-get remove --purge ufw, and then removed /etc/rc.firewall and anything referencing guarddog or ufw in all my rc[1-5].d directories. This was prompted because nmap couldn't see anything on my machine that I wanted to connect to from the other machine. And when I did nmap to the machine that wasn't allowed to connect, it wouldn't show 222 as being open despite my ufw'ing accept 222 on it and ufw status showing it open. That's what led me to just remove ufw and all other traces of firewalls to be "safe", with the debug anyways.
          This at least let me see a response from my ssh which recognized that the fingerprint in my "knownhosts" had changed. After deleting that file, I could now connect to the machine.... Thanks for your help -- I guess that is a hazard of going and doing a full system reinstall, instead of just "upgrading".... Of course, my upgrade failed and locked my machine up, which is the reason I had to reinstall from scratch. :-|


          Now to "reinstall" ufw and set that back up to see what happens.

          Thanks for the nmap suggestion... Seems like a useful tool.
          Kurt

          Comment


            #6
            Re: weird ssh problem

            Hi,

            glad that you make it.

            maybe there were some conflicting firewall rule over there.

            You better choose one of them, ufw or guardog.

            Best wishes

            Distributor ID: Ubuntu
            Description: Ubuntu Trusty Tahr (development branch)
            Release: 14.04
            Codename: trusty

            Comment


              #7
              Re: weird ssh problem

              And because this thread is useful to all concerned we encourage people to mark solved threads as SOLVED Instructions on how to do that are in my signature - and yes, nmap is cool
              Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

              Comment

              Working...
              X