In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article to share with you is about how to use x11 forwarding to display X Windows, Xiaobian think it is very practical, so share it with you to learn, I hope you can gain something after reading this article, not much to say, follow Xiaobian to see it.
When developing Linux, we often need to access Linux servers via ssh.
In addition to command-line login, we also use Cygwin, X-Win32, Xmanager, NoMachine, Xming and other software to establish X Server on local Windows and display remote X Window.
More recently, we often jump between servers via ssh.
This article mainly describes how to configure the sshd server and client parameters to obtain X11 forwarding via ssh.
To enable the ssh channel to obtain the forwarding function of X11, it needs to be set at the same time on the server and client.
For tools that connect directly to the server via SSH, the tools are the client (and many tools automatically configure the client), so we only need to focus on the server configuration.
For the case of logging in to the springboard machine (one or several intermediate servers acting as springboards) and then logging in to the server indirectly, the springboard machine itself acts as both a server and a client, requiring two configurations.
server
The server-side configuration is located in/etc/ssh/sshd_config, which is configured to ensure that the server-side sshd service can perform X11 forwarding.
Make sure the file contains the following options:
X11Forwarding yes
After modifying this file, you need to restart the sshd service:
service sshd restart client
There are two ways for clients to ensure that ssh can do X11 forwarding:
Modify the/etc/ssh/ssh_config or ~/.ssh/config file
The former is the global configuration and the latter is the current user configuration. If both exist, the latter overrides the former configuration.
There are two options to note:
ForwardX11
ForwardX11Trusted
These two options affect each other as follows:
ForwardX11ForwardX11Trustedssh_modenonodisablednoyesdisabledyesnountrustedyesyestrunsted
Interpretation of ssh_mode:
disabled: X11 forwarding is not possible, but the ability to obtain forwarding can be improved through the ssh command parameter.
untrusted: X11 forwarding over untrusted connections. In this mode, the current client defaults to an untrusted client and does not trust the sshd server. Therefore, this client has limited permissions on the server and cannot modify other clients displayed by X11 through this client. (Of course, other clients cannot modify the current client!) Clients in this mode can also be promoted to trusted clients by configuring the-Y parameter for the ssh command.
trusted: X11 forwarding through trusted connections, where the current client trusts the sshd server and has full control of X11, meaning it can modify other clients displaying X11. Clients in this mode can also be reduced to untrusted clients by configuring the-X parameter for the ssh command.
By specifying parameters for the ssh command
Specify specific parameters for the ssh command that affect the mode of the current client. This overrides the settings in the previous configuration file.
ssh_argsssh_modesshdisabledssh -Xuntrustedssh -Ytrunsted
Finally, many clients fail to function properly in untrusted mode.
The above is how to use x11 forwarding to display X Windows, Xiaobian believes that some knowledge points may be seen or used in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.