Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GINK03/2f4a8cce5bdfd293ee47bb547a0ea9a1 to your computer and use it in GitHub Desktop.
Save GINK03/2f4a8cce5bdfd293ee47bb547a0ea9a1 to your computer and use it in GitHub Desktop.
Linuxでパスワード認証をユーザ単位で無効化してssh認証にする

Private Keyを.ssh/authorized_keysに書き込む

$ dummy@Akatsuki:~/.ssh$ cat > authorized_keys
....hogehoge....

600permission

$ dummy@Akatsuki:~/.ssh$ chmod 600 authorized_keys

/etc/ssh/sshd_configを編集してユーザ単位でsshのpasswordオーソリケーションを無効化する

 PasswordAuthentication no
 Match User dummy
 PasswordAuthentication yes
 Match all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment