最近,使用ubuntu 发现默认不能使用 x11转发。配置修改如下:

sudo vim /etc/ssh/sshd_config:修改服务端的sshd

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。
X11Forwarding yes

sudo systemctl restart sshd.service

sudo vim /etc/ssh/ssh_config:修改客户端的ssh

sudo systemctl restart ssh.service

开启x11服务器:可把操作添加到 ~/.bashrc之中

xhost + # 实际操作过程中,此步骤可省略

xclock测试;

参考链接:https://www.cnblogs.com/tsfh/p/9022170.html 

此种方法,在内网服务器操作时,比较有效,方便;

保持更新,转载请注明出处; cnblogs.com/xuyaowen;

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄