简体   繁体   English

Google云端平台-SSH / Telnet

[英]Google Cloud Platform - SSH/Telnet

I am running apps on Compute Engine. 我正在Compute Engine上运行应用程序。 I run on a Windows box and use Putty to connect to the CE. 我在Windows框上运行,并使用Putty连接到CE。 This pretty much seems to work fine (leaving aside the problems in the Google doc on this). 这看起来似乎很好用(将Google文档中的问题排除在外)。

I have set up another user who I want to enable for SSH (on a Mac) and have her use FileZilla to push files to the CE. 我设置了另一个要在Mac上启用SSH的用户,并让她使用FileZilla将文件推送到CE。

I am trying it out on my own Mac. 我正在自己的Mac上试用。 I set up 2 firewall rules with 2 different priorities for tcp:22 = 我为tcp:22 =设置了2个具有2个不同优先级的防火墙规则

myssh Apply to all  IP ranges: 0.0.0.0/0 tcp:22 Allow 1000 default
default-allow-ssh Apply to all IP ranges: 0.0.0.0/0 tcp:22 Allow 65534 default

The user has permissions on of the Project of: "Compute Instance Admin(v1)" 用户具有以下项目的权限:“计算实例管理员(v1)”

On the Mac terminal I do the following: 在Mac终端上,执行以下操作:

ssh-keygen -t rsa -f ~/.ssh/userfirstname-ssh-key -C [googleusername.gmail.com]

I go to the GCP CE Meta data (logged in as myself) and then copy the contents of the userfirstname-ssh-key.pub to the Metadata/SSH Keys and save. 我转到GCP CE元数据(以我自己的身份登录),然后将userfirstname-ssh-key.pub的内容复制到元数据/ SSH密钥并保存。

After GCP gives the ok on the key being added I enter the following in the Mac terminal: 在GCP确认添加的密钥正确后,我在Mac终端中输入以下内容:

ssh -i [userfirstname]-ssh-key [googleusername.gmail.com]@gcp-external-ip 

Depending on i-don't-know-what, sometimes it says "Permission denied (public key)", "Operation timed out" 根据我不知道的内容,有时会显示“权限被拒绝(公共密钥)”,“操作超时”

I've repeated this a few times and just tried to telnet in to the gcp-external-ip and get "Operation timed out" telnet: Unable to connect to remote host. 我已经重复了几次,只是尝试通过telnet进入gcp-external-ip并获取“操作超时” telnet:无法连接到远程主机。

At a complete loss. 不知所措。 Please help. 请帮忙。

You could (and should) use the gcloud command line tools. 您可以(并且应该)使用gcloud命令行工具。 Then it is easiest to simple copy the correct gcloud command from the Web Console. 然后,最简单的方法是从Web控制台简单地复制正确的gcloud命令。 There is a little drop-down menu next to 'SSH' for each of your instances. 每个实例的“ SSH”旁边都有一个下拉菜单。

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

相关问题 如何在 Google Cloud Platform 中启动 macOS 实例? 我需要 mac 实例来运行 xamarin.ios 应用程序的 xcode 构建 - How to Launch macOS instance in Google Cloud Platform? I am in need of mac instance to run xcode build of xamarin ios app 安装 Google Cloud SDK 时出错 - Error Installation Google Cloud SDK 在mac平台上,如何以编程方式确定用户何时通过SSH会话登录? - On the mac platform, how can I programmatically determine when a user logs in via an SSH session? 在OSX 10.9.1上安装Google Cloud SDK时出现问题 - trouble installing Google Cloud SDK on OSX 10.9.1 Tensorflow Error tensorflow / core / platform / cloud / http_request.cc:334 - Tensorflow Error tensorflow/core/platform/cloud/http_request.cc:334 使用Shellscript(OSX)进行Telnet - Telnet byusing Shellscript (OSX) Mac-与普通打印机一样打印到Google Cloud Print / HP eprint - Mac - Print to Google Cloud Print/HP eprint as a normal printer 已安装Google Cloud SDK但无法访问gcloud - Installed Google Cloud SDK but can't access gcloud 使用SFTP编辑文件权限到Google Cloud Engine Wordpress网站 - Edit file permissions using SFTP to Google Cloud Engine Wordpress website 安装google cloud sdk时出现“ImportError:没有名为zlib的模块” - “ImportError: No module named zlib” when install google cloud sdk
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM