Showing posts with label problem in log into remote server using ssh -X. Show all posts
Showing posts with label problem in log into remote server using ssh -X. Show all posts

Tuesday, January 7, 2014

X11 forwarding request failed on channel 0

X11 forwarding request failed on channel 0
Error: no display specified

If you are facing this error while connecting remote server through ssh -X, see the post below.

When you try to open display of remote server on your system, you may get this error.

To remove this error, follow the solution.

Solution :

1) Open file /etc/ssh/sshd_config on remote server where you want to connect.

2) The following attribute must be uncommented in the file as well as set as yes.
X11Forwarding yes
Now restart ssh/sshd and try to connect to the server.

3) If X11Forwarding has been set as yes in the file and it is still showing same error, Find the following attribute in the file, uncomment it and set it no.
X11UseLocalhost no
4) Now restart ssh/sshd and try to connect to the server.
service ssh restart
or
service sshd restart
According to your Linux Distribution.

If you are still facing the problem after restarting ssh service, check there is a file .Xauthority in home directory of server.
If it is not there create it using following command.
First log in to the server command prompt using ssh and run following command there.
mkxauth -c
Now restart ssh/sshd and try again.