如果没有通过 ssh 进行 sudo,Vim 将无法运行

如果没有通过 ssh 进行 sudo,Vim 将无法运行

我无法再vim在我的服务器上使用ssh没有sudo前缀的 via。

静默失败的命令(永不结束):

touch foo   # works fine: I do have writing permissions in that folder
vim foo     # fail
vim         # fail

一切正常:

sudo vim foo
sudo vim

答案1

好的,问题是这样的:

ssh -Y我使用启用的选项进行登录trusted X11 forwarding,如下所述man ssh

 -Y      Enables trusted X11 forwarding.  Trusted X11 forwardings are not
         subjected to the X11 SECURITY extension controls

         (Debian-specific: This option does nothing in the default configuration:
         it is equivalent to “ForwardX11Trusted yes”, which is the default as
         described above.  Set the ForwardX11Trusted option to “no” to restore
         the upstream behaviour.This may hange in future depending on client-side
         improvements.)

不使用这个选项进行连接以某种方式解决了这个问题。

相关内容