9 Replies Latest reply: Jan 24, 2013 7:46 AM by EdStevens RSS

    X Forwarding using XMing and Putty

    Jimbo
      Hi,

      I am trying to run xclock as a test through an SSH tunnel I have set up ( in preparation for running OUI the same way ).

      1. My Putty SSH terminal connection has been successful and I have logged on as root
      For this connection I have ticked the X Forwarding box under the SSH - X11 section of Putty and I also set the X Display location as localhost:1.0
      I have checked that localhost is defined as 127.0.0.1 in the hosts files of my desktop and the bacjen unix server

      2. From this SSH session on the unix server, I set my DISPLAY to localhost:1.0 and export ( the same setting I have Xming Server running on my desktop as )

      3. I then launch xclock fro the SSH session. However it just sits doing nothing. Xming shows no X Clients running

      4. I check the event log of Putty and it shows

      Requesting X11 Forwarding
      X11 Forwarding Refused

      Any ideas of what's going wrong ?
      Jim
        • 1. Re: X Forwarding using XMing and Putty
          EdStevens
          Jimbo wrote:
          Hi,

          I am trying to run xclock as a test through an SSH tunnel I have set up ( in preparation for running OUI the same way ).

          1. My Putty SSH terminal connection has been successful and I have logged on as root
          For this connection I have ticked the X Forwarding box under the SSH - X11 section of Putty and I also set the X Display location as localhost:1.0
          I have checked that localhost is defined as 127.0.0.1 in the hosts files of my desktop and the bacjen unix server

          2. From this SSH session on the unix server, I set my DISPLAY to localhost:1.0 and export ( the same setting I have Xming Server running on my desktop as )
          requests to localhost/127.0.0.1 will never leave the computer from which they originate.

          I use exactly the same setup -- PuTTY and xming running on my Windows desktop. PuTTY connection to the *nix server.  I never set DISPLAY at all.  I just enable x11 forwarding in my putty connection. 

          3. I then launch xclock fro the SSH session. However it just sits doing nothing. Xming shows no X Clients running

          4. I check the event log of Putty and it shows

          Requesting X11 Forwarding
          X11 Forwarding Refused

          Any ideas of what's going wrong ?
          Jim
          • 2. Re: X Forwarding using XMing and Putty
            Jimbo
            If I do not set the display at all from the root user, then when I try to launch xclock I get
            Error: can't open display
            • 3. Re: X Forwarding using XMing and Putty
              EdStevens
              Jimbo wrote:
              If I do not set the display at all from the root user, then when I try to launch xclock I get
              Error: can't open display
              root?

              Are you doing that as root, then doing an su to oracle? If so, that will break the port forwarding.

              Also, double check your putty session/connection definition. You should be sure you 'save' the named definition. And when you modify any of the settings, you have to go back to the session tab to save it.

              Edited by: EdStevens on Jan 23, 2013 8:10 AM
              • 4. Re: X Forwarding using XMing and Putty
                Jimbo
                nope, I am not going to any other user - I remain in the SSH session as root

                Yes my Putty definition for SSH with X11 forwarding is saved and it is the one I am using
                • 5. Re: X Forwarding using XMing and Putty
                  Jimbo
                  every setup note I have seen, say to set the DISPLAY to localhost:0
                  I have tried localhost:0.0 and localhost:1.0 but to no avail
                  • 6. Re: X Forwarding using XMing and Putty
                    Jimbo
                    thanks - got it sorted.

                    My AIX platform does not enable X11 Forwarding by default in the SSH Config. Enabled it, bounced SSH and hey presto xclock appears in my X Server
                    Jim
                    • 7. Re: X Forwarding using XMing and Putty
                      EdStevens
                      Jimbo wrote:
                      thanks - got it sorted.

                      My AIX platform does not enable X11 Forwarding by default in the SSH Config. Enabled it, bounced SSH and hey presto xclock appears in my X Server
                      Jim
                      Ah. I was not aware that x11 forwarding had to be configured on the server as well. I'm using Oracle Linux exclusively, and all of my machines must have that by default. So I had never seen it NOT work as long as putty was properly configured.

                      And to reiterate, with this setup, you don't need to worry about DISPLAY at all.
                      • 8. Re: X Forwarding using XMing and Putty
                        Jimbo
                        Thanks Ed, yes I was able to launch without setting DISPLAY at all from the AIX side - good side benefit !

                        Ed do you know if it is possible to run other protocols through the SSH tunnel ? ( I have heard it is and hence that is why network administrators are not overly keen on SSH as it can be used to get round specific protocol denials they have placed directly on the firewall ).

                        I know SSH is an intended replacement for all the r* remote commands such rsh, rexec etc - however I thought I remember a note about someone launching Firefox from the server side through the SSH tunnel ? ( I could be dreaming ! )

                        Also is it possible to configure your desktop side web browser to use the tunnel. I am trying to see if OEM ( in particular dbconsole rather then grid control ) can use the tunnel.

                        thanks,
                        Jim
                        • 9. Re: X Forwarding using XMing and Putty
                          EdStevens
                          Jimbo wrote:
                          Thanks Ed, yes I was able to launch without setting DISPLAY at all from the AIX side - good side benefit !

                          Ed do you know if it is possible to run other protocols through the SSH tunnel ? ( I have heard it is and hence that is why network administrators are not overly keen on SSH as it can be used to get round specific protocol denials they have placed directly on the firewall ).

                          I know SSH is an intended replacement for all the r* remote commands such rsh, rexec etc - however I thought I remember a note about someone launching Firefox from the server side through the SSH tunnel ? ( I could be dreaming ! )

                          Also is it possible to configure your desktop side web browser to use the tunnel. I am trying to see if OEM ( in particular dbconsole rather then grid control ) can use the tunnel.

                          thanks,
                          Jim
                          I really can't answer any of those questions with any authority, as I'm really not a network guy. I really don't understand 'tunneling', thought I never thought of the ssh protocol itself as 'tunneling', but merely introducing a level of encrypting, whereas telnet was/is completely open text. DBconsole uses https, so I don't know how ssh may or may not fit into that.