3
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 3 years have passed since last update.

ssh 鍵を設定したはずなのに、パスワードを求められる時の対処法

Last updated at Posted at 2020-06-18

概要

https://qiita.com/kenmaro/items/a548a302228029c5c870
以前上の記事で、ssh鍵を作り、サーバーにおくことで快適にリモートサーバー内のdockerにも
ssh アクセスできるようになる手順を書いた。

この時、鍵認証を行っていればパスワード認証はいらないはずだが、
設定したにもかかわらずパスワードを聞かれた時の対処法。

もしパスワードを聞かれないようにしたい時は、以下で解決できるかもしれない。

解決法

http://www.linuxproblem.org/art_9.html
ここを参考にした。とても単純だが、
リモートサーバ上の、 ~/.ssh/authorized_keys
のパーミッションを確認して欲しい。

自分の場合は、 

sudo chmod 700 ~/.ssh
sudo chmod 640 authorized_keys
をすることで、sshする際のパスワード認証を聞かれなくなった。

備忘録的にまとめたが、めんどくさい手順をカットしたいときは試してもらいたい。

以上。

終わり。

3
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
3
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?