Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
X11 forwarding not working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 461
Location: India

PostPosted: Tue Apr 16, 2019 8:37 pm    Post subject: X11 forwarding not working Reply with quote

Hi Experts, I am trying to forward the display from one of my remote servers to my local desktop using ssh however it does not seems to be working.

On the remote server -

Quote:
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost no
TCPKeepAlive yes
ClientAliveInterval 60
ClientAliveCountMax 3


Profile set on remote server is
Quote:
default/linux/amd64/17.0/desktop *


now when I try from my local machine by issueing ssh -X root@192.168.10.10, it connects me to that server as below -

Quote:
apples-MacBook-Pro-2:~ admin$ ssh -X root@192.168.10.10
yahoo ~ #


I have built openssh server using X on the remote server as below -
Quote:
USE="X" emerge openssh


On the local machine, I have enable X11Forwarding too as below -

Quote:
apples-MacBook-Pro-2:~ admin$ sudo vim /etc/ssh/sshd_config
X11Forwarding no
X11DisplayOffset 10
X11UseLocalhost yes
TCPKeepAlive yes
ClientAliveInterval 60
ClientAliveCountMax 3


I am completely out of ideas and need your expert advice in this .
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1687
Location: Frankfurt, Germany

PostPosted: Tue Apr 16, 2019 8:41 pm    Post subject: Reply with quote

Try 'ssh -Y' instead of 'ssh -X'.
Back to top
View user's profile Send private message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 461
Location: India

PostPosted: Tue Apr 16, 2019 8:57 pm    Post subject: Reply with quote

getting the same thing -

Quote:
apples-MacBook-Pro-2:~ admin$ ssh -Y root@192.168.10.10
yahoo ~ #
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1687
Location: Frankfurt, Germany

PostPosted: Tue Apr 16, 2019 9:23 pm    Post subject: Reply with quote

manu_leo wrote:
apples-MacBook-Pro-2:~ admin$ ssh -Y root@192.168.10.10
yahoo ~ #

Ok, but that's exactly the expected behavior. You log in and you get a prompt. That's it.

You have to start a X11 program like xeyes, xclock, kate or firefox to see something...

What did you expect to happen?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14300

PostPosted: Wed Apr 17, 2019 2:03 am    Post subject: Reply with quote

manu_leo wrote:
apples-MacBook-Pro-2:~ admin$ ssh -Y root@192.168.10.10
That is a rather unusual prompt for a Linux machine (Gentoo or otherwise). Are you using OS X as your client? If so, are you actually running an X11 server on the OS X system?

Last edited by Hu on Thu Apr 18, 2019 1:43 am; edited 1 time in total
Back to top
View user's profile Send private message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 461
Location: India

PostPosted: Wed Apr 17, 2019 4:48 am    Post subject: Reply with quote

Hi mike155, so I was not very sure abt the working of x11 forwarding via ssh as I am using it for the first time. So as you mentioned, I should first ssh -Y onto the remote host and then from there should run either xeyes or firefox, I tried doing that and getting the below error -

Quote:
apples-MacBook-Pro-2:~ admin$ ssh -Y root@192.168.10.10
yahoo ~ # xeyes
Error: Can't open display: localhost:10.0


Hi Hu, I have installed XQuartz on my mac pro for this purpose.

Thanks guys for all your help.
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1687
Location: Frankfurt, Germany

PostPosted: Wed Apr 17, 2019 12:26 pm    Post subject: Reply with quote

Please check your configuration:

On your local machine:
  1. The X server must be up and running. Do X11 programs (xclock, xterm, xeyes, etc.) work and do X11 windows pop up?

  2. The xauth tool must be available on the local X server:


  3. You don't need to change anything in /etc/ssh/sshd_config. This file is NOT involved. Remove the changes you made there.

On the remote machine:
  1. The SSH server must be up and running with the options below in /etc/ssh/sshd_config:
    Code:
    AllowTcpForwarding yes
    X11Forwarding yes

    I would NOT change the default values for X11DisplayOffset and X11UseLocalhost.
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 5707
Location: Removed by Neddy

PostPosted: Wed Apr 17, 2019 4:20 pm    Post subject: Reply with quote

so is this a server (Gentoo) or client (OSX) issue?

do you have a gentoo box that can act as a client to prove where the issue is
_________________
The best argument against democracy is a five-minute conversation with the average voter
Great Britain is a republic, with a hereditary president, while the United States is a monarchy with an elective king
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum