因此,我只是試用GCloud服務,並嘗試通過ssh連接。在第一時間我忘記了我的Mac的用戶名,所以我沒有錯做這個:SSH無法連接到Google Cloud
doe-MacBook-Pro:Documents does$ ssh -i ~/.ssh/google_compute_engine [email protected]
Warning: Identity file /Users/does/.ssh/google_compute_engine not accessible: No such file or directory.
The authenticity of host '111.111.111.111 (111.111.111.111)' can't be established.
ECDSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added '111.111.111.111' (ECDSA) to the list of known hosts.
Permission denied (publickey).
後來我知道我的用戶名,我想:
doe-MacBook-Pro:Documents does$ ssh -i ~/.ssh/google_compute_engine [email protected]
Warning: Identity file /Users/does/.ssh/google_compute_engine not accessible: No such file or directory.
Permission denied (publickey).
,這讓我的錯誤。你能告訴我如何解決這個問題?
我該怎麼做? – yogieputra
在你的主目錄中,執行'ls -l .ssh',看看這個文件是否存在,以及它是否檢查了它的權限。 –
@Liverpool這是一個文件權限的快速教程:http://www.tutorialspoint.com/unix/unix-file-permission.htm –