zoukankan      html  css  js  c++  java
  • Xshell_Using X11 forwarding

    FROM:http://www.netsarang.com/tutorial/xshell/1018/Using_X11_forwarding

    The X11 forwarding feature is a special case of port forwarding. The X11 protocol is used by PC X server software and the connection is made from the remote server to the local PC, a reverse of other client programs such as email or telnet. By using the X11 forwarding, you can skip the setting up complicated port forwarding rules required to run X server software.

    Step 1: Configuring X11 Forwarding in Xshell
    1. On the File menu, click Open. The Sessions dialog box shows up.
    2. Click a session in which you want to configure the tunneling service.
    3. Click the Properties button on the toolbar. The Properties dialog box shows up. Click Tunneling category.
      576905
    4. In the X11 Tunneling section, check Forward X11 connections to.
    5. If you have Xmanager installed in your system, select Xmanager.
    6. If you use another PC X server, select X display location and enter the proper display name.
    7. Click OK to save your changes.
    Step 2: Configuring X11 forwarding service in the SSH server

    Setup the configuration file in the following table.

    SSH server
    Config file
    Setup

    OpenSSH
    /etc/ssh/sshd_config
    X11Forwarding yes

    SSH.COM
    /etc/ssh2/sshd2_config
    AllowX11Forwarding yes

    Now, you are ready to execute remote X11 applications in the SSH shell prompt securely over the SSH tunnel.

    Step 3: Running X applications from the Xshell terminal
    1. If Xmanager is installed on your PC, just go to the next step. Otherwise, run the PC X server installed on your PC first.
    2. Establish the SSH connection using the session you configured.
    3. At the shell prompt of Xshell, execute an X11 application as following:
      [nathaniel@intranet ~]$ xterm &
      You have tried to run X11 applications securely over the secure SSH tunnel so far. If you have any problems in running X11 applications, see the Troubleshooting section below.
    Troubleshooting
    1. Xshell shows "Failed to execute Xmanager: Make sure that Xmanager is correctly installed in this system." message.
      The session is configured to forward the X11 connection to Xmanager, but Xmanager is not found in your system. To use Xmanager, download and install Xmanager and run X11 application again. To use other PC X servers, open the Properties dialog box and go to the X11 Tunneling section. Then, select X display location and enter the proper X display name.
    2. Xshell shows "The remote SSH server rejected an X11 forwarding request." message.
      Make sure that the X11 forwarding feature of the remote SSH server is enabled.
      • For OpenSSH servers: In the file /etc/ssh/sshd_config, set
        X11Forwarding yes
      • For SSH.COM servers: In the file /etc/ssh2/sshd2_config, set
        AllowX11Forwarding yes
      • For other ssh server products: Refer to the SSH server manual from its provider.
  • 相关阅读:
    duilib中各控件响应的消息类型
    CoInitialize()、CoInitializeEx()和AfxOleInit()区别联系
    Linux下反斜杠号""引发的思考
    人生规划和GTD——“知”、“得”与“合”
    一次失败的面试——IBM电话面试
    Duilib介绍以及各个类的简介
    Linux与Windows中动态链接库的分析与对比
    VC++创建、调用dll的方法步骤
    网络对抗 Exp0 Kali安装 Week1
    2018-2019-1 20165226_20165310_20165315 实验五 通讯协议设计
  • 原文地址:https://www.cnblogs.com/xusweeter/p/6059698.html
Copyright © 2011-2022 走看看