Dear Jonathan, Although port forwarding may be very useful, but it doesn't solve this specific problem. let us assume everything with ssh port forwarding is correct, and client is able to connect to a remote jupyter server via SSH -NLX. the problem is, if the client opens his browser an initiates a new jupyter file and execute the below cell:
*!xclock* the GUI application of the xclock will be executed on the remote server and will not be forwarded to client machine. Please note that if the client, here a windows user, initiates an ssh -X command by PuTTY, and execute the command serverA@xclock, the GUI will be forwarded to the client side successfully! Sincerely, Mohammad On Saturday, August 29, 2020 at 6:13:11 PM UTC+2 Jonathan Gutow wrote: > I'm not sure what you are trying to achieve, but you will get better > response of Jupyter in the browser if the browser is running on your > client, rather than your server. I suggest you use ssh port forwarding. You > will need something like this on your client: > > $ ssh -NL localhost:8080:localhost:8080 username@serverA > > You will get asked for the password and can then point your client's > browser at localhost:8080 to access the Jupyter server (this assumes 8080 > is the local port it is running on). > > An OK discussion with more details of this technique may be found at: > https://www.howtogeek.com/168145/how-to-use-ssh-tunneling/ > <https://www.howtogeek.com/168145/how-to-use-ssh-tunneling/> > How to Use SSH Tunneling to Access Restricted Servers and Browse Securely > - How-To Geek <https://www.howtogeek.com/168145/how-to-use-ssh-tunneling/> > An SSH client connects to a Secure Shell server, which allows you to run > terminal commands as if you were sitting in front of another computer.But > an SSH client also allows you to “tunnel” a port between your local system > and a remote SSH server. There are three different types of SSH tunneling, > and they’re all used for different purposes. > www.howtogeek.com > > > Dr. Jonathan Gutow > Chemistry Department > UW Oshkosh > web: https://uwosh.edu/facstaff/gutow > e-mail: [email protected] > Ph: 920-424-1326 <(920)%20424-1326> > > > ------------------------------ > *From:* [email protected] <[email protected]> on behalf of > [email protected] <[email protected]> > *Sent:* Saturday, August 29, 2020 8:27 AM > *To:* Project Jupyter <[email protected]> > *Subject:* [jupyter] Multiple X11 forwardings on ubuntu and > jupyter-notebook > > > CAUTION: This email originated from outside of the organization. Do not > click links or open attachments unless you recognize the sender and know > the content is safe. > > > Dear All, > > We are using jupyter-notebook for educational purpose. We are facing the > below issue. Please disregard this post if it is irrelevant to the > discussion group. > > I have installed jupyter-notebook on an ubuntu 18.04; let us call it *Server > A*. I successfully establish SSH to *server A* initiated by my client ( > *Client > B*). I am able to visually forward X11 running of Firefox to *Client B* > using the below command. > > *On Client B: * > *SSH -X@Server A ip Address* > *user1# sudo jupyter-notebook --allow-root* > *user1# firefox &* > > Now, Inside the jupyter-notebook in firefox tab, I am able to execute a > GUI-based application - I am able to run Linux shell command inside the > firefox tab(jupyter-notebook session). > *!xclock * > > The problem is that the xclock is executed on the *Server A* > successfully, but it is not forwarded to a new X11 window on the *Client > B*. Is it possible to forward xclock(GUI Application), which is initiated > by the jupyter-notebook session (firefox tab) to *client B*, while the > firefox is also initiated by SSH connection from * Client B*? > > Sincerely, > Mohammad > > -- > You received this message because you are subscribed to the Google Groups > "Project Jupyter" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jupyter/2f61a136-a236-48ea-915c-d5ba0fad51e9n%40googlegroups.com > > <https://groups.google.com/d/msgid/jupyter/2f61a136-a236-48ea-915c-d5ba0fad51e9n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/479c1d48-f995-48b4-b3e1-0b9a8d1b5792n%40googlegroups.com.
