2016-04-14 27 views
-1

私は試した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. 
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. 
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). 

その後、私は自分のユーザー名を知って、私が試してみました。どうすればこの問題を解決できますか?

答えて

1

これはsshユーザー名とは関係ありません。 チェック二つ最初、私たちはそこから行くことができます。

  1. 許可:それは全く存在しない:すなわち、少なくとも0400.
  2. ファイル、あなたが読み取り可能でなければなりませんか?
+0

どうすればいいですか? – yogieputra

+0

あなたのホームディレクトリに 'ls -l .ssh'を実行し、ファイルが存在するかどうか、そしてそのファイルのアクセス権をチェックするかどうかを確認してください。 –

+0

@Liverpoolここでは、ファイルのアクセス許可の簡単なチュートリアルです:http://www.tutorialspun.com/unix/unix-file-permission.htm –

0

問題解決済み!

私はgcloud compute ssh project-nameコマンドを完了していないことを忘れています。 コマンドを終了すると、ファイルgoogle_compute_engineが作成されます。 これで、SSH経由でGoogle Cloudに接続することができました。

関連する問題