Error on internet browsing - SSH

This is a discussion on Error on internet browsing - SSH ; I am trying to do a normal tunneling, I connect to my shell account on port 22, I set up the port forwarding on port 8080, then I change the Firefox proxy settings to localhost and port 8080. I am ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: Error on internet browsing

  1. Error on internet browsing


    I am trying to do a normal tunneling, I connect to my shell account on
    port 22, I set up the port forwarding on port 8080, then I change the
    Firefox proxy settings to localhost and port 8080.

    I am getting this error when I try to browse the internet:

    SSH-2.0-OpenSSH_4.5
    Protocol mismatch.

    ANy help appreciated, it is the first time I attempt to do tunneling.


    --

    Netvibes: http://www.netvibes.com

  2. Re: Error on internet browsing

    Fretu schreef:
    >
    > I am trying to do a normal tunneling, I connect to my shell account on
    > port 22, I set up the port forwarding on port 8080, then I change the
    > Firefox proxy settings to localhost and port 8080.
    >
    > I am getting this error when I try to browse the internet:
    >
    > SSH-2.0-OpenSSH_4.5
    > Protocol mismatch.


    Your post lacks a lot of information. Where do you get this error? How
    did you set up this "normal tunneling"? What client are you using? What
    is your actual question?

    My error-prone crystal bowl says:
    Either don't use proxy and connect to http://localhost:8080, OR
    Use dynamic forwarding and set localhost:8080 as a SOCKS 4 proxy.

  3. Re: Error on internet browsing

    Fretu writes:

    > I am trying to do a normal tunneling, I connect to my shell account on
    > port 22, I set up the port forwarding on port 8080, then I change the
    > Firefox proxy settings to localhost and port 8080.
    >
    > I am getting this error when I try to browse the internet:
    >
    > SSH-2.0-OpenSSH_4.5
    > Protocol mismatch.
    >
    > ANy help appreciated, it is the first time I attempt to do
    > tunneling.


    Look like you've screwed up the tunnelling and the web browser is
    connecting to an sshd rather than a web server or proxy.

    To get help, you'll need to post what flavor of ssh client you're
    using, and what settings you're attempting. If using openssh, post
    the command line you tried.

    You'll also need to be more specific about which proxy fields you
    populated in firefox and what values you put in there.



    Best Regards,
    --
    Todd H.
    http://www.toddh.net/

  4. Re: Error on internet browsing

    Todd H. wrote:
    > Fretu writes:
    >
    >> I am trying to do a normal tunneling, I connect to my shell account on
    >> port 22, I set up the port forwarding on port 8080, then I change the
    >> Firefox proxy settings to localhost and port 8080.
    >>
    >> I am getting this error when I try to browse the internet:
    >>
    >> SSH-2.0-OpenSSH_4.5
    >> Protocol mismatch.
    >>
    >> ANy help appreciated, it is the first time I attempt to do
    >> tunneling.

    >
    > Look like you've screwed up the tunnelling and the web browser is
    > connecting to an sshd rather than a web server or proxy.
    >
    > To get help, you'll need to post what flavor of ssh client you're
    > using, and what settings you're attempting. If using openssh, post
    > the command line you tried.
    >
    > You'll also need to be more specific about which proxy fields you
    > populated in firefox and what values you put in there.



    Thanks to everyone for trying help.

    The error I mentioned appears on the browser Window(Firefox2.0)
    I am using a shell account from a friend in Lebanon that allows me to do
    port forwarding, my computer is placed in the UK. I am on Windows2000.

    As far as I know my friend is running Fedora Linux, I do not know many
    more specifics besides the fact that I've been told port forwarding is
    allowed. So how I set up this?


    Putty:

    SSH+Tunnels
    Source Port: 8080
    Destination: shell.com:22

    (ADD)
    (Local and Auto Radio Buttons checked)

    Now back to "Session" in Putty:

    Hostname: shell.com Port:22
    (SSH Protocol radio button checked)

    Firefox2.0 Settings:

    Tools>Options>Network>Settings>Manual Proxy Configuration:

    HTTP Proxy: localhost Port 8080

    No Proxy for: localhost, 127.0.0.1

    Now I open session in Putty, enter my username and password, try to
    browse the internet and Firefox says:

    >> SSH-2.0-OpenSSH_4.5
    >> Protocol mismatch.


    That is about all, I hope it helps to troubleshoot and thanks in advance

  5. Re: Error on internet browsing

    Fretu wrote:
    > Todd H. wrote:
    >> Fretu writes:
    >>
    >>> I am trying to do a normal tunneling, I connect to my shell account on
    >>> port 22, I set up the port forwarding on port 8080, then I change the
    >>> Firefox proxy settings to localhost and port 8080.
    >>>
    >>> I am getting this error when I try to browse the internet:
    >>>
    >>> SSH-2.0-OpenSSH_4.5
    >>> Protocol mismatch.
    >>>
    >>> ANy help appreciated, it is the first time I attempt to do
    >>> tunneling.

    >> Look like you've screwed up the tunnelling and the web browser is
    >> connecting to an sshd rather than a web server or proxy.
    >>
    >> To get help, you'll need to post what flavor of ssh client you're
    >> using, and what settings you're attempting. If using openssh, post
    >> the command line you tried.
    >>
    >> You'll also need to be more specific about which proxy fields you
    >> populated in firefox and what values you put in there.

    >
    >
    > Thanks to everyone for trying help.
    >
    > The error I mentioned appears on the browser Window(Firefox2.0)
    > I am using a shell account from a friend in Lebanon that allows me to do
    > port forwarding, my computer is placed in the UK. I am on Windows2000.
    >
    > As far as I know my friend is running Fedora Linux, I do not know many
    > more specifics besides the fact that I've been told port forwarding is
    > allowed. So how I set up this?
    >
    >
    > Putty:
    >
    > SSH+Tunnels
    > Source Port: 8080
    > Destination: shell.com:22


    Now there's your problem (in raspy redneck voice). Now you're connecting
    to an ssh server as if it spoke HTTP.

    Replace 22 by 80.

    > Tools>Options>Network>Settings>Manual Proxy Configuration:
    >
    > HTTP Proxy: localhost Port 8080


    Just enter http://localhost:8080 in your address bar instead of using it
    as a proxy.

  6. Re: Error on internet browsing


    >>>> I am getting this error when I try to browse the internet:
    >>>>
    >>>> SSH-2.0-OpenSSH_4.5
    >>>> Protocol mismatch.
    >>>>


    >> Putty:
    >>
    >> SSH+Tunnels
    >> Source Port: 8080
    >> Destination: shell.com:22

    >
    > Now there's your problem (in raspy redneck voice). Now you're connecting
    > to an ssh server as if it spoke HTTP.
    >
    > Replace 22 by 80.
    >
    >> Tools>Options>Network>Settings>Manual Proxy Configuration:
    >>
    >> HTTP Proxy: localhost Port 8080

    >
    > Just enter http://localhost:8080 in your address bar instead of using it
    > as a proxy.


    OK I am nearly there...

    Should I tick the "enable X11 forwarding" checkbox?

    I've been told to tick it and enter "localhost:0" where it says "Display
    X11 location"

    So far I am doing it but the tutorials I have read on the net about port
    forwarding say nothing about this.

    I have replaced the 22 port by the 80 as told and I am not getting the
    error message anymore but I still can't browse the internet, when I
    replace the port 22 by 80 my browser takes me to my friends website on
    his server and I can't get out of there whatever URL I enter on Firefox
    website.



    --

    Netvibes: http://www.netvibes.com

  7. Re: Error on internet browsing

    >>>>> "Fretu" == Fretu writes:

    >>>>> I am getting this error when I try to browse the internet:
    >>>>>
    >>>>> SSH-2.0-OpenSSH_4.5 Protocol mismatch.
    >>>>>


    >>> Putty:
    >>>
    >>> SSH+Tunnels Source Port: 8080 Destination: shell.com:22

    >> Now there's your problem (in raspy redneck voice). Now you're
    >> connecting to an ssh server as if it spoke HTTP. Replace 22 by 80.
    >>

    Tools> Options>Network>Settings>Manual Proxy Configuration:
    >>> HTTP Proxy: localhost Port 8080

    >> Just enter http://localhost:8080 in your address bar instead of
    >> using it as a proxy.


    Fretu> OK I am nearly there...

    Fretu> Should I tick the "enable X11 forwarding" checkbox?

    No; it's irrelevant here.

    Fretu> I've been told to tick it and enter "localhost:0" where it says
    Fretu> "Display X11 location"

    Fretu> So far I am doing it but the tutorials I have read on the net
    Fretu> about port forwarding say nothing about this.

    Fretu> I have replaced the 22 port by the 80 as told and I am not
    Fretu> getting the error message anymore but I still can't browse the
    Fretu> internet, when I replace the port 22 by 80 my browser takes me
    Fretu> to my friends website on his server and I can't get out of
    Fretu> there whatever URL I enter on Firefox website.

    Yes, that's right. You're sending every HTTP request to his web server,
    so of course that's what happens. You need a proxy, not just a web
    server, to forward to. If he were running squid, for example, and you did
    static forwarding to that, it would work. The simpler solution, as has
    already been suggested, is to use a TCP level proxy via SOCKS. Use "ssh
    -D 8080 " (no remote forwarding socket info since it's
    dynamic), and set your web browser to use a SOCKS proxy at localhost:8080.

    --
    Richard Silverman
    res@qoxp.net


  8. Re: Error on internet browsing (solved!)


    >
    > Yes, that's right. You're sending every HTTP request to his web server,
    > so of course that's what happens. You need a proxy, not just a web
    > server, to forward to. If he were running squid, for example, and you did
    > static forwarding to that, it would work. The simpler solution, as has
    > already been suggested, is to use a TCP level proxy via SOCKS. Use "ssh
    > -D 8080 " (no remote forwarding socket info since it's
    > dynamic), and set your web browser to use a SOCKS proxy at localhost:8080.
    >



    I have managed to do it now!

    I am still thankful to the group for the time taken to try and solve
    it though there were some missing data, and what put me on the right
    track is this tutorial with screenshots (in case others have the same
    problem):

    http://thinkhole.org/wp/2006/05/10/h...im-with-putty/

    I had searched other tutorials but this is the only one with the CORRECT
    details I needed, of course as it is Firefox specific and I use it,
    thats helped.

    It happens that I had to click the "Dynamic" button in putty and the
    Destination had to be left empty.

    But I learned quite a bit attempting to make it work, so all good what
    ends up good.



    --

    Netvibes: http://www.netvibes.com

+ Reply to Thread