さくらVPS(CentOS)にWordPressを入れるまで その0
0.基本設定
0-1 ユーザーの追加
#useradd ${user}
#passwd ${user}
#usermod -G wheel ${user}
#vi /etc/pam.d/su
→auth required pam_wheel.so user_uid(コメント解除)
これでwheelグループのユーザーのみsuが使える
0-2 macからsshでつなぐ
macから
$ssh-keygen
$scp id_rsa.pub ${user}@${ipアドレス}:/home/${user}/.ssh/
0-3 authorized_keysに追加
$cat id_rsa.pub >> authorized_keys
$chmod 600 authorized_keys
0-4 SSH設定変更
$su -
#vi /etc/ssh/sshd_config
→PermitionRootLogin no =rootでのログインを禁止
→PubkeyAuthentication yes =公開鍵認証を許可
→AuthorisedKeysFile .ユーザ認証の際に使われる公開鍵を格納しているファイル名を指定
/authorized_keys = →PasswordAuthentication no =パスワード認証を行わない
→UsePAM no
→#UsePAM yes
=PAM(Pluggable Authentication Module)