Cancelling x11 forwarding

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

Topic author
issinoho
Valued Contributor
Posts: 71
Joined: Wed Apr 05, 2023 9:22 am
Reputation: 0
Location: Glasgow, Scotland
Status: Online
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?
DEC technology veteran since 1990

User avatar

martinv
Master
Posts: 146
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
Never believe that a few caring people can't change the world. For, indeed, that's all who ever have.
(Margaret Mead)

User avatar

Topic author
issinoho
Valued Contributor
Posts: 71
Joined: Wed Apr 05, 2023 9:22 am
Reputation: 0
Location: Glasgow, Scotland
Status: Online
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
DEC technology veteran since 1990

User avatar

martinv
Master
Posts: 146
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
Never believe that a few caring people can't change the world. For, indeed, that's all who ever have.
(Margaret Mead)

User avatar

Topic author
issinoho
Valued Contributor
Posts: 71
Joined: Wed Apr 05, 2023 9:22 am
Reputation: 0
Location: Glasgow, Scotland
Status: Online
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.
DEC technology veteran since 1990

Post Reply