Page 1 of 1
How to enable X-forwarding in the OpenSSH server
Posted: Mon Jun 26, 2023 9:15 am
by joukj
Hi All,
I do on my linux system: ssh -Y openvms-machine
With HP TCP/IP services I always got an X-display to tunnel X through ssh defined on the OpenVMS machine,
With OpenSSH(AXP, Itanium & X86) I get "X11 forwarding request failed on channel 0" just after the connection is made and of course no display available in OpenVMS.
I set X11Forwarding=yes in ssh_configd,
Now I have no Idea how to get the x-forwarding working.
Regards
Jouk
Re: How to enable X-forwarding in the OpenSSH server
Posted: Wed Jun 28, 2023 9:18 pm
by babydr
@Joukl , Try looking for a logical name that has X11.*offset sort of name . Somehow it appears that the present server thinks it has to offset the Display by '0' (Zero) which is ALWAYS the local primary display device .
Hth , JimL
Re: How to enable X-forwarding in the OpenSSH server
Posted: Thu Jun 29, 2023 1:28 am
by joukj
In the configuration file there are 2 options "X11DisplayOffset 10" and "X11UseLocalHost yes". So the dedaults look OK. Even uncommenting them and defining them explicitly does not help.
Re: How to enable X-forwarding in the OpenSSH server
Posted: Sun Nov 05, 2023 7:15 pm
by mike632t
joukj wrote: ↑Mon Jun 26, 2023 9:15 am
"X11 forwarding request failed on channel 0"
Does anyone know how to resolve this problem?
I can use X11 forwarding when connecting to another Linux system, but I'm getting exactly the same error when I try to use X11 forwarding when connecting to an Open VMS E9.2-1 system using OpenSSH.
Code: Select all
$ ssh -vv -X vmsuser@192.168.0.42
OpenSSH_9.2p1 Debian-2+deb12u1, OpenSSL 3.0.11 19 Sep 2023
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
;
;
;
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug2: we did not send a packet, disable method
debug1: Next authentication method: password
vmsuser@192.168.0.42's password: PASSWORD
debug2: we sent a password packet, wait for reply
Authenticated to 192.168.0.42 ([192.168.0.42]:22) using "password".
debug1: channel 0: new session [client-session] (inactive timeout: 0)
:
:
:
debug1: Remote: No xauth program; cannot forward X11.
debug2: channel_input_status_confirm: type 100 id 0
X11 forwarding request failed on channel 0
:
:
:
debug2: shell request accepted on channel 0
This is node VMS092, running VMS E9.2-1
Last interactive login on Sunday, 5-NOV-2023 23:29:56.31
Last non-interactive login on Sunday, 5-NOV-2023 20:52:02.65
$ SHOW DISPLAY
%DECW-W-OPENIN, error opening DECW$DISPLAY as input
-SYSTEM-W-NOSUCHDEV, no such device available
$
I have noticed that I get one login failure just before I enter the vmsuser's password, but I think this is normal as I'm not using a preshared key to authenticate.
I suspect that the client is trying to tell me that xauth is not installed or not running on VMS092?
Updated : 6/11
I have tried to use the instructons
here but without success ("X11 forwarding request failed on channel 0").
Re: How to enable X-forwarding in the OpenSSH server
Posted: Mon Nov 06, 2023 4:55 am
by dmjb
VSI have stated that X forwarding is not supported in OpenSSH on VMS. I don't remember if this only applies to x86, or if it applies to OpenSSH on Alpha and IA64 as well.
Re: How to enable X-forwarding in the OpenSSH server
Posted: Mon Nov 06, 2023 10:02 am
by imiller
recently on comp.os.vms
https://groups.google.com/g/comp.os.vms ... QNvQkEBAAJ Rob Brooks posted
The VMS port by VSI of OpenSSH does not yet support X port forwarding.
It's coming soon.
--
-- Rob
Re: How to enable X-forwarding in the OpenSSH server
Posted: Mon Nov 06, 2023 7:26 pm
by mike632t
I'd seen the posts that said that X11 forwarding wasn't supported/working (yet), but the linked post
here seems to suggest that there is a work around.
I think the commands the post suggests are as follows, first connect to the VMS system using the '-R' option to redirect any connections to port 6000 on the (VMS) host to port 6000 on the localhost.
Code: Select all
$ ssh -R 6000:127.0.0.1:6000 user@vms92
Then login and create a display on the VMS system using 127.0.0.1 (this should default to using port 6000, which will be (reverse) forwarded to port 6000 on the localhost).
Code: Select all
$ SET DISPLAY/CREATE/TRANSPORT=TCPIP/NODE=127.0.0.1
$ sh display
Device: WSA1: [super]
Node: 127.0.0.1
Transport: TCPIP
Server: 0
Screen: 0
$
This makes sense in theory but I've obviously not got it quite right as I get the following error.
Code: Select all
$ RUN SYS$SYSTEM:DECW$CLOCK
connect_to 127.0.0.1 port 6000: failed.
XIO: fatal IO error 65535 (network partner disconnected logical link) on X server "_WSA1:"
after 0 requests (0 known processed) with 0 events remaining.
X Error of failed request: BadConnection (fatal error on display connection)
Major opcode of failed request: 1 (X_CreateWindow)
Serial number of failed request: 0
Current serial number in output stream: 0
%XLIB-E-ERROREVENT, error event received from server
Xlib: client uses different protocol version (11) than server (0)!
X Toolkit Error: Can't Open display
%DWT-F-NOMSG, Message number 03AB8204
$
Re: How to enable X-forwarding in the OpenSSH server
Posted: Wed Nov 15, 2023 7:21 am
by mike632t
Found the missing piece of the puzzle!!! (It was obvious once I thought of it).
You need to allow inbound connections to the xserver from 127.0.0.1, before connecting using ssh.