简体   繁体   English

谷歌云平台无权从SSH下载

[英]google cloud platform no permission to download from SSH

when I try to download a file while in the ssh for a vm instance in the root\\ directory, it says failed. 当我尝试在ssh中为root \\目录中的vm实例下载文件时,它说失败了。 Trying to access the file, it said no permission 尝试访问该文件,它说没有权限

As Alessio said, most likely you don't have permission. 正如Alessio所说,您很可能没有许可。 There are basically three approaches you could take: 基本上可以采用三种方法:

1) Change the permission of the file so whatever user you are using to SSH with has permission. 1)更改文件的权限,以便您正在使用SSH的任何用户都具有权限。

2) Use sudo (or equivalent) to get access to the file, copy it someplace where the account you are using has permissions (I like to use /tmp, especially if it isn't a shared system) and then download it from there. 2)使用sudo(或等效文件)来访问文件,将其复制到您正在使用的帐户具有权限的地方(我喜欢使用/ tmp,特别是如果它不是共享系统),然后从那里下载文件。

3) Change your login username in SSH to something that has permission. 3)将您在SSH中的登录用户名更改为具有权限的名称。 How to do this is described at the bottom of the page at https://cloud.google.com/compute/docs/ssh-in-browser 页面底部的https://cloud.google.com/compute/docs/ssh-in-browser描述了如何执行此操作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM