gce가 로컬에서 gcloud로 연결할 수 없게되면 우분투에서.
gce VM에 gcloud로 연결할 수 없을 때
gcloude로 연결하려고 다음 오류가 발생하면
junk@junk-VirtualBox:~$ gcloud compute --project "custom-unison-XXXXX" ssh --zone "asia-east1-a" "main"
Warning: Permanently added '104.155.XXX.XXX' (ECDSA) to the list of known hosts.
Permission denied (publickey).
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].
대응
1. 로컬 PC의 접속 유저의 home아래.ssh내의 「google_compute_engine.pub」의 파일 내용을 카피한다.
※이 키는 rsa의 공개키입니다
view ~/.ssh/google_compute_engine.pub
2. 웹의 Compute Engine의 VM 인스턴스에서 대상 VM을 클릭하여 서버의 고급 설정을 엽니다.

4. 해당 서버의 ssh에 이전에 복사한 공개 키의 텍스트를 붙여 넣습니다.

5. 저장을 클릭
6. gcloud로 연결해 봅니다.
junk@junk-VirtualBox:~$ gcloud compute --project "custom-unison-XXXXX" ssh --zone "asia-east1-a" "main"
Warning: Permanently added '104.155.XXX.XXX' (ECDSA) to the list of known hosts.
Welcome to Ubuntu 12.04.5 LTS (GNU/Linux 3.13.0-55-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Sat Jul 18 02:47:16 UTC 2015
System load: 1.09 Processes: 110
Usage of /: 3.1% of 98.40GB Users logged in: 1
Memory usage: 20% IP address for eth0: 10.240.67.98
Swap usage: 0%
Graph this data and manage this system at:
https://landscape.canonical.com/
Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud
New release '14.04.2 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
Your Hardware Enablement Stack (HWE) is supported until April 2017.
Last login: Sat Jul 18 01:43:57 2015 from 121.110.XX.XXX
junk@main:~$
연결할 수 있습니다!
Reference
이 문제에 관하여(gce가 로컬에서 gcloud로 연결할 수 없게되면 우분투에서.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/junk1400/items/3da23b3c318d991e1fcd텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)