You are not logged in.

#1 2023-09-05 01:45:33

genji
Member
Registered: 2023-08-13
Posts: 61

Trying to get X forwarding to work through SSH

Hello all, I am using an app called MobaXterm in Windows that supposedly is great for X forwarding but it's not working for me.

  04/09/2023   21:43.18   /home/mobaxterm  ssh -X genji@192.168.0.252
X11 forwarding request failed on channel 0
Last login: Mon Sep  4 21:39:33 2023 from 192.168.0.3
[genji@gateway-nord ~]$ startx

/usr/lib/Xorg.wrap: Only console users are allowed to run the X server
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
Couldn't get a file descriptor referring to the console.

It's saying X11 forwarding request failed right off the bat I see..  Is anyone familiar with what I need to do?  Different app or something maybe?

Thank you!

Offline

#2 2023-09-05 04:35:32

just4arch
Member
Registered: 2023-01-07
Posts: 122

Re: Trying to get X forwarding to work through SSH

You probably need to set "X11Forwarding yes" in /etc/ssh/sshd_config.

BUT I think you want to read up on what this actually does...
You don't start X in the SSH session, you'll need a local X server - there are some for windows.

Offline

#3 2023-09-05 04:37:08

genji
Member
Registered: 2023-08-13
Posts: 61

Re: Trying to get X forwarding to work through SSH

Hi just4arch!  MobaXterm has this built in I believe, one of it's big features - and it's enabled everywhere I can find inside the app itself..  I tried running just X apps directly as well instead of startx ..  I'm going to check that sshd_config though and I'll post back, thank you

Offline

#4 2023-09-05 05:16:22

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,589
Website

Re: Trying to get X forwarding to work through SSH

Try running ssh in verbose mode in order to get some more debug output.


Inofficial first vice president of the Rust Evangelism Strike Force

Online

#5 2023-09-05 06:12:44

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,095

Re: Trying to get X forwarding to work through SSH

Sanity check: you're trying to ssh -X into a remote host from a running X11 session?
Because the "startx" there looks like there might be a misconception of what X11 forwarding is or does.

Online

#6 2023-09-05 12:30:29

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Trying to get X forwarding to work through SSH

And why are you running ssh directly from a command line?  According to the webpage, MobaXterm has it's own interface for establishing a connection to a remote machine.  You are connecting from the windows machine to the arch machine, right? (If you're going the other way MobaXterm is not relevant).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB