If you are using Cygwin to get a display server for your Oracle GUI-driven installations or tools like dbca, asmca (as I do from time to time), you can encounter annoying problem with X11 forwarding.

I had set as always those setting on the server in /etc/ssh/sshd_config
X11Forwarding yes
# required if you disabled ipv6
AddressFamily inet

Trying to connect to the server with X11 forwarding I got the error below:

$ ssh -X oracle@db1.dba24.pl
oracle@db1.dba24.pl’s password:
Warning: untrusted X11 forwarding setup failed: xauth key data not generated

xclock doesn’t work, Let’s check if the display has been set properly

[oracle@db1.dba24.pl ~]$ echo $DISPLAY
nothing returned here

I was stuck – it was working for months, but found that note:
http://x.cygwin.com/docs/faq/cygwin-x-faq.html

ssh -X now says “Warning: untrusted X11 forwarding setup failed: xauth key data not generated”

See Q: 6.1. and following. See point 3 in this mail. Use ssh -Y.

Technical details: ssh tried to run xauth generate to create a untrusted cookie for the session, which failed because the server isn’t compiled with the XCSECURITY extension built-in. Since OpenSSH 7.2p1, ssh does not fallback to trusted forwarding, so no X11 forwarding is setup.

Let’s test -Y

$ ssh -X -Y oracle@db1.dba24.pl
oracle@db1.dba24.pl’s password:
Last login: Tue Mar 22 16:22:57 2016 from cygwin.dba24.pl[oracle@db1.dba24.pl ~]$

Now it works, xclock displays on my windows terminal.
Check DISPLAY just because I am curious:

[oracle@db1.dba24.pl ~]$ echo $DISPLAY
localhost:10.0

I hope it saves your time. enjoy!!

About the author

 
maciej tokar
Maciej Tokar

An Oracle technology geek and crazy long distance runner, DBA24 Owner
Senior Oracle DBA / Consultant / [OCP10g, OCP12c, OCE RAC 10g] / [experience: 9y+]
Currently working for Bluegarden (Oslo Norway) by Miratech Group
Past: Mastercard / Trevica by Britenet, Citi International PLC, PZU

 
View Maciej Tokar's profile on LinkedIn         logoDB4
LinkedIn Auto Publish Powered By : XYZScripts.com