本文的主要參考
https://superuser.com/questions/249045/x11-forwarding-from-amazon-ec2-ami
背景
在Amazon提供的免費EC2 中,使用MobaXterm連接之後想要在本地打開一個圖形界面怎麼辦?
前面的事情就不多說了。參考我的另一篇博客。
https://blog.csdn.net/Kangyucheng/article/details/106666528
來到了這裏
來到這裏之後,發現輸入xclock之後並不能找到命令。哈哈,沒關係忽略它。
在電腦中已經正確安裝Chrome之後,我們可以測一下,輸入
google-chrome
總之是打不開滴。。。。。。。。。。。。。。。。。就不放截圖了。
解決辦法
輸入命令
sudo yum install xorg-x11-xauth.x86_64 xorg-x11-server-utils.x86_64 dbus-x11.x86_64
然後安裝成功了,輸入命令
sudo systemctl restart sshd.service
再重新連一下試試。
發現 X11 之處不太一樣了。打開Chrome看看。
如果還是不行
執行命令
sudo vim /etc/ssh/sshd_config
修改一下這兩個值。不過默認,第一個是開啓的。