What is the solution to x11 forwarding error of ssh server
How to solve the x11 forwarding error of ssh server? I believe many inexperienced people don't know what to do about it. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
SSH's X11 Forwarding feature provides a great way to execute remote host GUI programs on your local host.
But if the use of the Times is wrong, how to solve it?
1. Check the configuration of the linux host
You need to configure the OpenSSH service on your remote linux host to enable X11 Forwarding. In the OpenSSH configuration file (/ etc/ssh/sshd_config), open the following two items:
AllowTcpForwarding yes
X11Forwarding yes
Turn on both options, and then restart the sshd service.
Note:
Using X11 Forwarding does not require running a desktop system on a remote host, that is, performing startx.
To use X11 Forwarding, you need to install the RPM package Xorg-x11-xauth. If you choose to install X Window System when installing the linux system, this package is installed by default.
# yum-y install xorg-x11-xauth xclock
# xclock is used to test gui output
/ etc/init.d/sshd restart restart sshd service
Can be verified
Now we can connect to the remote machine using ssh's ForwardX11 function:
Root@cuba#ssh-X xxx.xxx.xxx.xxx xxx is the ip address of the remote machine. The-X parameter is to enable the ForwardX11 function.
After the connection is successful, you can run the x program directly in the remote terminal, and the interface will appear directly on the local machine.
After reading the above, have you mastered the solution to the x11 forwarding error of the ssh server? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!