Ran below commands on MobaXTerm:
Using MobaXTerm terminal on windows laptop:
> xhost +ulv78.abc.com
ulv78.abc.com being added to access control list
> ssh -l someuser ulv78.abc.com # RHEL 7.x
SECURITY NOTICE:
Unauthorized use is prohibited. Use of this private computer system is your consent to being recorded and monitored. We reserve the right to seek all remedies for unauthorized use. Evidence of suspected illegal use may be given to law enforcement.
X11 forwarding request failed on channel 0
Last login: Thu Sep 20 12:06:57 2018 from win_host_name
$ bash
$ echo DISPLAY=win_host_name:0.0; export DISPLAY >> .bashrc
$ sudo su - # as root sudoer
$ echo DISPLAY=win_host_name:0.0; export DISPLAY >> .bashrc
$ cd /install_path
$ ./setup
Error: Can't open display: win_host_name:0.0
Above session has X11 forwarding request failed on channel 0
error
Edit:
Set DISPLAY
entry in .profile
& .bashrc
. As soon as I connect from MobaXterm terminal, below is the output:
> ssh -l someuser ulv78.abc.com
SECURITY NOTICE:
Unauthorized use is prohibited. Use of this private computer system is your consent to being recorded and monitored. We reserve the right to seek all remedies for unauthorized use. Evidence of suspected illegal use may be given to law enforcement.
X11 forwarding request failed on channel 0
Last login: Thu Sep 20 12:36:54 2018 from win_host_name
$ echo $DISPLAY
win_host_name:0.0
$ xterm
xterm: Xt error: Can't open display: win_host_name:0.0
$
1) How to resolve X11 forwarding error?
2) I see wrong domain name showing in the last login msg of ssh client.
xhost
. What was the value ofDISPLAY
as soon as you connected, before you changed it? – JigglyNaga Sep 20 '18 at 16:36DISPLAY
value iswin_host_name:0.0
as soon as connected. I have added entries in.profile
and.bashrc
. – overexchange Sep 20 '18 at 16:43.bashrc
and.profile
(you might need to delete those lines again in order to find out)? And could you run an X client (such asxterm
) as the normal user, before yousudo
? – JigglyNaga Sep 20 '18 at 16:45.profile
and.bashrc
before doing that? – JigglyNaga Sep 20 '18 at 16:50DISPLAY
variable will not be set.. – overexchange Sep 20 '18 at 16:51DISPLAY
automatically. – JigglyNaga Sep 20 '18 at 16:58DISPLAY
not set. why would MobaXterm set it? – overexchange Sep 20 '18 at 17:04grep X11 /etc/ssh/sshd_config
, on the server? – JigglyNaga Sep 20 '18 at 17:05X11Forwarding yes
. i already verified this..Am not sure.. I understand your below answer... – overexchange Sep 20 '18 at 17:07