Re: [External] X-Windows Over VPN Issues

From: Rich J <rich242j_at_gmail.com>
Date: Tue, 7 Apr 2020 14:12:10 -0500
Message-ID: <CAANsBX0u+UcUZWuX2uoPFSA-XET8MMJ26U8mQJVeHLXL6ccFHA_at_mail.gmail.com>



Hey Scott,

I've had this issue for years because our AIX boxes (that run Oracle) have all generic accounts locked out. So, out of the box, I can't use any of Oracle's GUIs.

So, to run any Oracle GUI, I need to:

  1. Have a local X-Windows server/display.
  2. Enable access on the local X server (listening for access and xhost authorization).
  3. Enable X11 forwarding on whatever SSH terminal you're using.
  4. Use magic cookie for X11 authentication.
  5. Make sure the sshd allows "X11Forwarding yes" in /etc/ssh/sshd_config on the remote server.

I use Cygwin-X for my local X server and PuTTY/KiTTY for SSH.

On starting Cygwin-X with the the "--listen tcp" parameter for startxwin, I launch an X-term and allow the remote display with "xhost +hostname" where "hostname" is your remote SSH server. One can also open this wide for any remote servers by using "xhost +", but that's not recommended, except for maybe troubleshooting.

Fire up the SSH client, making sure that forwarding of X11 is enabled and it's using MIT Magic Cookies, and login to the remote server. If all of the above conditions are met, you should be able to open an X-windows GUI back to your X-server.

If you're like me and need to "su - oracle" to get anything Oracle done, then your $DISPLAY variable is now empty and will not be able to work -- yet. Before the "su -", do an "echo $DISPLAY", then "xauth list". Now you can "su - oracle" and set the DISPLAY variable to what it was on the prior login (e.g. "localhost:10.0"). Finally, "xauth add [line from xauth list above]", where the last parameter is the line from "xauth list" that has the matching key to your DISPLAY. For example, if your DISPLAY is "localhost:*10*.0", look for an xauth output of "servername/unix:*10* MIT-MAGIC-COOKIE-1 blahblahblahblah".

This is a very messy email, but hope it makes a little bit of sense or at least fills in what pieces your might need. GL!

Rich

On Tue, Apr 7, 2020 at 1:35 PM Scott Canaan <srcdco_at_rit.edu> wrote:

> I did check the enable x11 forwarding in SecureCRT. There isn’t any place
> to set the authority.
>
>
>
> *Scott Canaan ‘88*
>
> *Sr Database Administrator *Information & Technology Services
> Finance & Administration
>
>
> *Rochester Institute of Technology *o: (585) 475-7886 | f: (585) 475-7520
>
> *srcdco_at_rit.edu <srcdco_at_rit.edu>* | c: (585) 339-8659
>
> *CONFIDENTIALITY NOTE*: The information transmitted, including
> attachments, is intended only for the person(s) or entity to which it is
> addressed and may contain confidential and/or privileged material. Any
> review, retransmission, dissemination or other use of, or taking of any
> action in reliance upon this information by persons or entities other than
> the intended recipient is prohibited. If you received this in error, please
> contact the sender and destroy any copies of this information.
>
>
>
> *From:* Jeffrey Beckstrom <jbeckstrom_at_gcrta.org>
> *Sent:* Tuesday, April 7, 2020 2:21 PM
> *To:* oracle-l-freelist <oracle-l_at_freelists.org>; Scott Canaan <
> srcdco_at_rit.edu>
> *Subject:* Re: [External] X-Windows Over VPN Issues
>
>
>
> I don;t know about xming, but with putty and cygwin I had to do:
>
>
>
> 1. Putty
>
> a. Under default settings, go to connection / ssh /x11. Enable X11
> and set authority to C:\cygwin64\home\xxxxxxxx\.Xauthority
>
>
>
>
>
> Jeffrey Beckstrom
> Lead Database Administrator
>
> Information Technology Department
>
> Greater Cleveland Regional Transit Authority
>
> 1240 W. 6th Street
> Cleveland, Ohio 44113
>
>
>
> >>> Scott Canaan <srcdco_at_rit.edu> 4/7/20 2:09 PM >>>
>
> With everyone working from home, a new issue has arisen. We can’t get
> x-windows to work over VPN. That makes it difficult to run things like
> dbua.
>
>
>
> Our environment:
>
> Windows 10 laptop – at home connected via Cisco VPN to work
>
> Xming running on laptop
>
> SecureCRT running on laptop, under Options -> session options, X11
> Forwarding turned on
>
>
>
> Linux 7 server
>
> Oracle 12, 18, and 19
>
>
>
> I’ve tried setting the DISPLAY to the IP address on my laptop (from
> ipconfig) and to 127.0.0.1:0.0.
>
>
>
> When I try to run dbua, it sits for a while then returns the following
> error:
>
>
>
> Exception in thread "main" java.lang.NoClassDefFoundError: Could not
> initialize class sun.awt.X11.XToolkit
>
>
>
> I’m sure someone has been able to get this to work. If anyone can let me
> know what needs to be done, I’d really appreciate it.
>
>
>
> Thank you,
>
>
>
> *Scott Canaan ‘88*
>
> *Sr Database Administrator *Information & Technology Services
> Finance & Administration
>
>
> *Rochester Institute of Technology *o: (585) 475-7886 | f: (585) 475-7520
>
> *srcdco_at_rit.edu <srcdco_at_rit.edu>* | c: (585) 339-8659
>
>
> *CONFIDENTIALITY NOTE*: The information transmitted, including
> attachments, is intended only for the person(s) or entity to which it is
> addressed and may contain confidential and/or privileged material. Any
> review, retransmission, dissemination or other use of, or taking of any
> action in reliance upon this information by persons or entities other than
> the intended recipient is prohibited. If you received this in error, please
> contact the sender and destroy any copies of this information.
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Apr 07 2020 - 21:12:10 CEST

Original text of this message