LoginSignup
1
0

More than 5 years have passed since last update.

sshの鍵認証設定でつまずいたところ

Last updated at Posted at 2017-03-05

当方VPS初心者で、sshを人生で初めて自分で行ったのですが、セキュリティのために鍵認証設定というものをしなくてはならないらしい。そこで、ドットインストールを参考にしながら設定をしていました。鍵を生成してサーバーに送るまではやったものの鍵認証でsshできなかった原因をメモ。

サーバー側のsshdの設定ファイルを書き換える

これができてなかっただけでした。ドットインストールでは言ってなかったんだけどな〜(笑)ということで設定方法を書いてく。

su
passwd:

まずrootでサーバーに入る。パスワードを入力。そしてsshd_configというsshdの設定ファイルを書き換えます

vim /etc/ssh/sshd_config

ここの行をコメントを外す

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile     .ssh/authorized_keys

保存して一度exitし、もう一度自分のパソコンからsshしてみたらできました。やった!

1
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
1
0