1

我一直在试图从一个谷歌云实例到另一个ssh。我能够从主机操作系统为Windows的本地机器和Ubuntu的VM操作系统进行SSH连接。谷歌从一个实例到另一个实例的SSh

我直接从网站运行命令。

1.

[email protected]:~$ eval `ssh-agent` 

2.

[email protected]:~$ ssh-add ~/.ssh/google_compute_engine 

3.

gcloud compute ssh --ssh-flag="-A" INSTANCE 

我得到的错误是

错误:(gcloud.compute)无效的选择:'ssh-flag = -A'。

我在互联网上看到的一切都是如何SSH进入虚拟机,而不是如何从一台虚拟机SSH到另一台。

+0

直接从哪个网站? –

+0

谷歌计算指南试图通过这个,但他们的例子必须被弃用或什么--- https://cloud.google.com/compute/docs/instances/connecting-to-instance –

回答

1

我仍然可以做到这一点,与97.0.0版本gcloud

> gcloud compute ssh --ssh-flag="-A" --zone=us-central1-f [email protected] 
Warning: Permanently added '104.197.77.90' (ECDSA) to the list of known hosts. 

The programs included with the Debian GNU/Linux system are free software; 
the exact distribution terms for each program are described in the 
individual files in /usr/share/doc/*/copyright. 

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent 
permitted by applicable law. 
[email protected]:~$ 

你肯定在#3的命令正确复制?

+0

它的工作先生。我得到的这个错误有点误导,我需要改变声明的另一部分而不是'A'的标志。谢谢! –

+0

它的工作,但我仍然不能从一个实例ssh到另一个实例。我收到'Permission denied(publickey)' –

+1

检查您尝试进入SSH的实例的串口输出。 –

相关问题