Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/algorithm/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google compute engine 如何禁用sudo-s命令ssh的使用?_Google Compute Engine_Google Cloud Platform - Fatal编程技术网

Google compute engine 如何禁用sudo-s命令ssh的使用?

Google compute engine 如何禁用sudo-s命令ssh的使用?,google-compute-engine,google-cloud-platform,Google Compute Engine,Google Cloud Platform,在Google Compute Engine中,要在控制台上注册私钥,如何禁用sudo-s命令ssh?听起来您试图将sudoers从根帐户的完全访问中锁定出来。即使你阻止sudoers以你描述的方式获得root的力量,他们也可以通过其他方式获得。示例: sudo bash sudo vi(然后从vi中运行shell命令) sudoless(然后从less中运行shell命令) sudo vi/etc/rc.sysinit(下次重新启动时免费提供) 您能否进一步阐述您的目标?事实上,这个问题几乎

在Google Compute Engine中,要在控制台上注册私钥,如何禁用sudo-s命令ssh?

听起来您试图将sudoers从根帐户的完全访问中锁定出来。即使你阻止sudoers以你描述的方式获得root的力量,他们也可以通过其他方式获得。示例:

  • sudo bash
  • sudo vi(然后从vi中运行shell命令)
  • sudoless(然后从less中运行shell命令)
  • sudo vi/etc/rc.sysinit(下次重新启动时免费提供)

您能否进一步阐述您的目标?事实上,这个问题几乎无法回答。OP意味着,默认情况下,如果您通过web界面添加新用户的SSH密钥,则该用户在通过SSH登录后将在VM上拥有完全的无密码sudo访问权限。OP询问如何为新添加的用户禁用sudo。