X11 forwarding request failed on channel 0

前端 未结 4 740
日久生厌
日久生厌 2021-02-07 01:24

When I do \"ssh -X abcserver\", I got message \"X11 forwarding request failed on channel 0\". I checked online and it was suggested to solve it by swit

4条回答
  •  遥遥无期
    2021-02-07 01:35

    1. sudo apt install xauth
    2. change the line #AddressFamily any to AddressFamily inet in /etc/ssh/sshd_config
    3. sudo service ssh restart

    This is enough on Ubuntu 18.04 LTS.

    After login with ssh -X (or after activating the PuTTY / KiTTY option "Enable X11 forwarding") you should see that the environment variable DISPLAY is automatically defined to localhost:10.0 or similar. After first successful login (with a functional X11 forwarding) the file .Xauthority will be generated. Another positive sign of success.

    If you are interested to see and to understand the details of X11 forwarding within your session you can try with lsof -i -P|grep ssh.

提交回复
热议问题