Cancelling x11 forwarding

All types of networks, network stacks, and protocols supported by OpenVMS.
Post Reply
User avatar

Topic author
issinoho
Master
Posts: 103
Joined: Wed Apr 05, 2023 9:22 am
Reputation: 0
Location: Glasgow, Scotland
Status: Offline
Contact:

Cancelling x11 forwarding

Post by issinoho » Fri Nov 01, 2024 11:24 am

When using an SSH session that has x11 forwarding enabled there are various problems with some basic operations, e.g. connecting to a remote system with key pairs, and (as a consequence) trying to use Git over SSH.

For instance, trying to validate an SSH session with a key pair to something like Bitbucket will result in the following...

Code: Select all

$ ssh -T git@bitbucket.org
x11_request_forwarding: bad authentication data: """
%TCPIP-F-SSH_FATAL, non-specific fatal error condition
And, of course, Git will fail because of this.

I tried using, set display/delete on the session but that seems to have no effect that I can see.

Anyone know how to cancel the x11 forwarding from a live session?
OpenVMS Ambassador
DEC technology veteran since 1990
http://vamp.issinoho.com

User avatar

martinv
Master
Posts: 158
Joined: Fri Jun 14, 2019 11:05 pm
Reputation: 0
Location: Goslar, Germany
Status: Offline
Contact:

Re: Cancelling x11 forwarding

Post by martinv » Mon Nov 04, 2024 2:00 am

You should be able to set any ssh option by specifying it with -o on the command line, like

Code: Select all

$ ssh -T -o "ForwardX11 no" git@bitbucket.org
HTH
Martin
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts.
(Bertrand Russell)

User avatar

Topic author
issinoho
Master
Posts: 103
Joined: Wed Apr 05, 2023 9:22 am
Reputation: 0
Location: Glasgow, Scotland
Status: Offline
Contact:

Re: Cancelling x11 forwarding

Post by issinoho » Mon Nov 04, 2024 5:26 am

That's really useful (and works) but to influence Git a more permanent configuration is required.

This looks to be the ticket, https://unix.stackexchange.com/question ... github-com

Just need to work out how to do this on VMS. I tried the following in SSH$ROOT:[ETC]sshd_config. but doesn't work. Any suggestions?

Code: Select all

Host bitbucket.org
    X11Forwarding no
OpenVMS Ambassador
DEC technology veteran since 1990
http://vamp.issinoho.com

User avatar

martinv
Master
Posts: 158
Joined: Fri Jun 14, 2019 11:05 pm
Reputation: 0
Location: Goslar, Germany
Status: Offline
Contact:

Re: Cancelling x11 forwarding

Post by martinv » Mon Nov 04, 2024 6:20 am

Your're barking up the wrong tree - sshd_config is the config file for the SSH Server (Daemon). The file you need is the client config file - [.ssh2]config. under your login directory.

HTH
Martin
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts.
(Bertrand Russell)

User avatar

Topic author
issinoho
Master
Posts: 103
Joined: Wed Apr 05, 2023 9:22 am
Reputation: 0
Location: Glasgow, Scotland
Status: Offline
Contact:

Re: Cancelling x11 forwarding

Post by issinoho » Mon Nov 04, 2024 7:20 am

Thanks. Looks like [~.ssh2] is not used any more and it's now [~.ssh] so the secret sauce here is to create config. in that folder and add the following.

Code: Select all

Host bitbucket.org
    ForwardX11 no

Host *
    ForwardX11 yes
Thanks for the help.
OpenVMS Ambassador
DEC technology veteran since 1990
http://vamp.issinoho.com

Post Reply