SSH Protocol Mismatch?

Discussion in 'OT Technology' started by DatacomGuy, Oct 17, 2006.

  1. DatacomGuy

    DatacomGuy is moving to Canada

    Joined:
    Oct 14, 2002
    Messages:
    16,546
    Likes Received:
    0
    Location:
    Tampa, FL
    I setup a debian vmware 'machine' so I could setup SSH to tunnel from a remote PC.

    I got it all setup last night, but when I go to the remote PC and setup 127.0.0.1 as the proxy, I get this error:
    Where should I start looking? This one is new to me. I googled, but no real helpful responses.

    I have SSH setup on port 443 on the server, for what its worth. And the router is forwarding.

    EDIT: I checked PuTTY logs, and it shows "Opening Forwarded connection to IP:443" then a second later "Forwarded port closed"
     
    Last edited: Oct 17, 2006
  2. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    try forcing the commandline to use ssh2 only. Or if the remote machine is only 1, then force it. You can pass a -1 or a -2 to the command. btw, why setup Debian just for the tunnel? If you have a windows machine, you can install and use cygwin. I use it everyday :)
     
  3. DatacomGuy

    DatacomGuy is moving to Canada

    Joined:
    Oct 14, 2002
    Messages:
    16,546
    Likes Received:
    0
    Location:
    Tampa, FL
    I like playing with debian :) The challenge is fun, but contemplating cygwin as well. Force commandline on the server for ssh2? Or through PuTTY
     
  4. samm

    samm Next in Line

    Joined:
    Dec 22, 2000
    Messages:
    2,630
    Likes Received:
    0
    Location:
    San Jose, CA
    try what SLED said:

    ssh -2 -L localport:host:remoteport host
     
  5. DatacomGuy

    DatacomGuy is moving to Canada

    Joined:
    Oct 14, 2002
    Messages:
    16,546
    Likes Received:
    0
    Location:
    Tampa, FL
    On the server, correct?
     
  6. DatacomGuy

    DatacomGuy is moving to Canada

    Joined:
    Oct 14, 2002
    Messages:
    16,546
    Likes Received:
    0
    Location:
    Tampa, FL
    OK. When I attempt to run

    ssh -2 -L 443:localhost:80

    It just shows me the ssh command line syntax options..

    If I add [email protected] to the end, I get errors.

    When I hit yes and enter,

     
  7. wagner

    wagner Disallowed words OT Supporter

    Joined:
    Sep 26, 2005
    Messages:
    28,313
    Likes Received:
    55
    Location:
    Helsinki, Finland
    Can you please clarify what you are trying to accomplish? Do you just want to open SSH terminal sessions to your debian box or do you actually want to tunnel some other application over SSH?
     
  8. DatacomGuy

    DatacomGuy is moving to Canada

    Joined:
    Oct 14, 2002
    Messages:
    16,546
    Likes Received:
    0
    Location:
    Tampa, FL
    The SSH connection to the debian server works just fine, running over port 443. I'm trying to tunnel HTTP traffic from the remote PC over the SSH connection. When I attempt to connect to a website in my browser after setting up the tunnel, the above error is what I get.
     
  9. samm

    samm Next in Line

    Joined:
    Dec 22, 2000
    Messages:
    2,630
    Likes Received:
    0
    Location:
    San Jose, CA
    Are you root when you do this? Only a root user can bind to ports lower than 1024, and based on your error message I am guessing that's the problem.
     
  10. DatacomGuy

    DatacomGuy is moving to Canada

    Joined:
    Oct 14, 2002
    Messages:
    16,546
    Likes Received:
    0
    Location:
    Tampa, FL
    Yes, I'm logged in as root.
     
  11. samm

    samm Next in Line

    Joined:
    Dec 22, 2000
    Messages:
    2,630
    Likes Received:
    0
    Location:
    San Jose, CA
    My guess would be something else is using that port.
     
  12. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    I think you have your -L syntax wrong. Here is how I have mine configured:

    ssh [user]@[remote linux server] -p [server port] -L localhost:3389:[remote win box]:3389

    this basically connects to my remote linux box (at home) which runs on port 21. Then I am opening a local port on my machine (for remote desktop) and forwarding that traffic to my remote windows system.
     
  13. wagner

    wagner Disallowed words OT Supporter

    Joined:
    Sep 26, 2005
    Messages:
    28,313
    Likes Received:
    55
    Location:
    Helsinki, Finland
    that makes sense

    HTTPS port = webserver?
     
  14. DatacomGuy

    DatacomGuy is moving to Canada

    Joined:
    Oct 14, 2002
    Messages:
    16,546
    Likes Received:
    0
    Location:
    Tampa, FL
    I do this, and get 'Bad Port Forwarding. "localhost:80:myworkip:443' error.

    Here is my syntax.

     
  15. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    hmmm, i dunno dude. I've done that shit in linux before, but currently just use cygwin. Make sure your localhost isn't running apache or anything that is using port 80 already..... oh wait..

    i just noticed that your ssh server is listening on 443 [-p 443]...

    and then in your -L statement, you want to forward all of your web traffic to that same box? Or is your [servername] a different machine than your [myworkip]?
     
  16. DatacomGuy

    DatacomGuy is moving to Canada

    Joined:
    Oct 14, 2002
    Messages:
    16,546
    Likes Received:
    0
    Location:
    Tampa, FL
    [servername] is different then [workip]. SSH is listening on port 443. Apache is running I believe, but on 8080. I want to forward port 80 outgoing from [workip/pc] over ssh on port 443. That's what I'm trying to accomplish.
     
  17. Rob

    Rob OT Supporter

    Joined:
    Jul 6, 2002
    Messages:
    88,621
    Likes Received:
    39
    Location:
    Atlanta, GA
    Copy and paste the whole Putty event log.


    And are you sure 443 is a raw open port straight to the internet? It isn't being blindly forced through a proxy server?
     
  18. DatacomGuy

    DatacomGuy is moving to Canada

    Joined:
    Oct 14, 2002
    Messages:
    16,546
    Likes Received:
    0
    Location:
    Tampa, FL
    From my work side?.. Not positive.Very possible its through a proxy.

    I may need to find a way to find a wide open port..
     

Share This Page