0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

windows11でVSCodeのRemote-SSHを使用してEC2に接続しようとすると、「It is required that your private key files are NOT accessible by others. > This private key will be ignored.」と表示された場合の1つの解決策

Posted at

状況

  • Windows11に最近アップデート
  • AWSを学んでみたいと、EC2上にapacheを立ててhtmlにアクセスできるか試し中

発生したエラー

VCCodeの拡張機能「Remote-SSH」を使用して、VCCode左のリモートエクスプローラーから接続しようとすると、
「It is required that your private key files are NOT accessible by others. > This private key will be ignored.」
のエラーが発生

解決策

pemファイルをデスクトップに作成したフォルダ内に格納していたのだが、
.ssh/configのIdentityFileに記載しているpemファイルまでのパスにOneDriveを含んでいたため、
発生していた。
OneDriveを含まないパスにすれば解決

余談

おそらく権限を変更しても解決しそうなのだが、一緒に進めていたWindows10の同期がすんなり接続できていたため試してみた。
ちなみにOneDrive上でなく、ローカルのデスクトップに戻したい場合は以下の手順で戻せます。

  1. エクスプローラーからOneDriveを右クリック
  2. OneDrive→OneDriveのバックアップを管理を選択
  3. デスクトップをOFFにする
  4. ユーザー/ユーザー名のデスクトップが表示されるので、OneDriveのデスクトップの内容をコピーしてくる
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?