Results 1 to 4 of 4

Thread: SSH Connection problem

  1. #1
    Trumpet-Eared Gentoo Freak
    Join Date
    Jan 2003
    Posts
    992

    Unhappy SSH Connection problem

    Hey,

    I'm trying to connect to my mandrake box at home from other locations via ssh.
    Now is my sshd_conf configured good cause I can connect from the Lan to that box just fine.
    Also the portforwarding from ext to int is set on 22.
    With a netstat | grep i saw 22 was listening. Yet, from other locations than the lan i can't connect. Well common sense tells me that it prolly will be the router that has problems.

    But still, the odd thing is I managed once to connect from out the lan.

    Two questions : -
    - The ListenAdress in the sshd_conf. How should it be set behind a router ?
    To the WAN adress ? the box adress ? the router-gateway adress ?

    - Does linux have some logs somewhere where you can see if he refused connections or which connections where accepted, something like that ?

    Thnx in advance,
    Come and check out our wargame-site @ http://www.rootcontest.org
    We chat @ irc.smdc-network.org #lobby

  2. #2
    Trumpet-Eared Gentoo Freak
    Join Date
    Jan 2003
    Posts
    992

    Talking

    Since no one could help me out here , I'd had to search it myself.
    Anyway I did it. Maybe it can be a contribution to post my answer here.

    Well, Some time ago instronics said to me maybe my isp is blocking connections on
    22 and stuff. At first I didn't believe it but since it wasn't working I thought to give it a go again.
    Well In my sshd_conf I set the Listenport on 10001 (like instronics suggested).
    restart the ssh daemon service and hehe it ****in'works ....
    Although I still find it very strange my isp would block this one cause ssh is in my view the most encrypted one or at least the most reliable one..

    I can connect from work on my box through ssh now....

    Hope this helps out some similar cases in the future...
    Come and check out our wargame-site @ http://www.rootcontest.org
    We chat @ irc.smdc-network.org #lobby

  3. #3
    Antionline's Security Dude instronics's Avatar
    Join Date
    Dec 2002
    Posts
    901
    Hi Shrekkie.

    But still, the odd thing is I managed once to connect from out the lan.
    Remember we had general problems connecting to your network from the outside?

    Can it be that you had ssh listening (port 22 which is a lowport) and that your ISP is not allowing services on lowports to your location? Maybe they discovered it and blocked it. Just a thought, since your on DSL right? Just for a testing purpose, try a high port (above 1023) and see if its the same. Remeber to also change your router settings to the highport specified.



    The ListenAdress in the sshd_conf. How should it be set behind a router ?
    This does not affect the router settings (xcept if you are denying access from your router (gateway)?

    Maybe it is a router problem as well. On my router (zyxel) there are 2 types of options. One is a default internal IP where all traffic can be redirected too, and i also have the options to just farward selected ports to specific IPs.


    Does linux have some logs somewhere where you can see if he refused connections or which connections where accepted, something like that?

    On my SuSE system, i have the following to monitor connections and logons etc.... :

    /var/log/messages = Shows be almost everything that goes on my computer.

    /var/log/allmessages = Shows a little bit more detail than "messages".

    /var/log/lastlog = which shows me the last logins per account.

    /var/log/xferlog = which shows me what files have come in or out on my ftpD (for proFTPd)


    One more thing which i have not tried yet. Maybe set the router's listening port to a highport and redirect it to port 22 on the local machine. Im not even sure if thats possible, i never tried that.

    Give me some feedback if it works, and tell me what you have changed to make it work. If you wanna try a few things, hola me on pm


    Cheers.

    //addon

    LOL shreekie, we shared the same ideas within the same 3 minutes HAHAHAHAHAHAHA

    Cya dude.
    Ubuntu-: Means in African : "Im too dumb to use Slackware"

  4. #4
    Trumpet-Eared Gentoo Freak
    Join Date
    Jan 2003
    Posts
    992
    Heh, thnx for the logs, still needed those,...

    Only I was 2 seconds faster :P

    Cya round
    Come and check out our wargame-site @ http://www.rootcontest.org
    We chat @ irc.smdc-network.org #lobby

Posting Permissions

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