0
I am sitting in a private IP machine (local) and want to install netbeans in another remote public IP machine (remote). The local machine runs Ubuntu and the remote machine runs CentOS.
I have downloaded the netbeans installer in the remote machine and changed it to an executable one.
Now, in remote, when I issue the command,
# ./netbeans-8.1-linux.sh
I get an error message,
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
To take care of this, in remote, I run,
# export DISPLAY=:0
In local, I run,
$ xhost +
and rerun the installer in remote turning on the verbose flag,
./netbeans-8.1-linux.sh --verbose
This gives the error message,
Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.
(I tried other variations like 0.0
).
As some searching over the net reveals, my only option left is, in remote, to issue the command,
# export DISPLAY=my.private.ip.address:0
This should fail and actually fails, since, this involves accessing a private IP machine from a real IP machine.
This is where I am facing a roadblock and need your help.
EDIT
Using ssh -X
and ssh -Y
failed
with the message,
X11 forwarding request failed on channel 0
I have checked /etc/ssh/sshd_config
in remote and
X11Forwarding yes
is already there.
EDIT 2
Output of ssh -v -X user@remote.real.ip.address echo Hello world | grep -C 10 "X11 forwarding request failed"
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: exec
debug1: Requesting X11 forwarding with authentication spoofing.
debug1: Sending environment.
debug1: Sending env LC_PAPER = en_US.UTF-8
debug1: Sending env LC_ADDRESS = en_US.UTF-8
debug1: Sending env LC_MONETARY = en_US.UTF-8
debug1: Sending env LC_NUMERIC = en_US.UTF-8
debug1: Sending env LC_TELEPHONE = en_US.UTF-8
debug1: Sending env LC_IDENTIFICATION = en_US.UTF-8
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending env LC_MEASUREMENT = en_US.UTF-8
debug1: Sending env LC_TIME = en_US.UTF-8
debug1: Sending env LC_NAME = en_US.UTF-8
debug1: Sending command: echo Hello world
debug1: Remote: No xauth program; cannot forward with spoofing.
X11 forwarding request failed on channel 0
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 1 clearing O_NONBLOCK
Transferred: sent 3136, received 2800 bytes, in 0.3 seconds
Bytes per second: sent 9839.6, received 8785.3
debug1: Exit status 0
Let's see something like
ssh -v -X any-other-options remote-server echo Hello world | grep -C 10 "X11 forwarding request failed"
for context. – a CVn – 2016-07-15T09:13:04.933Please see the edit. – Masroor – 2016-07-15T09:23:28.253
Okay, that's good; this should be enough for someone to actually write up an answer that helps you. Basically, it looks to me like
xauth
is missing on some end of the SSH pipe (I'm not sure which). Check to make sure it's available in the default $PATH on both systems, just to be sure. – a CVn – 2016-07-15T09:30:05.100Indeed,
xauth
was missing in remote. Installed. How do I make that useful? – Masroor – 2016-07-15T09:35:05.873Well, does X11 forwarding work for you now, using
ssh -X
orssh -Y
? – a CVn – 2016-07-15T09:38:17.983Yes, both the options work, but the installer fails. – Masroor – 2016-07-15T09:41:35.030