再起動中...

そのうち移行するはず

SAKURAの VPS を使用しはじめたときにしたこと

VPS コントロールパネルから作業するのがいい感じなので、
僕はそこからある程度の作業をした。
その記録。

ユーザーの追加

adduser hoge
passwd hoge
usermod -G wheel hoge

sshd の設定変更

PermitRootLogin no
PermitEmptyPassword no
AllowUsers hoge

PasswordAuthentication no

もし port を変更した場合は、iptables の変更をする必要がある

/sbin/iptables -A INPUT -p tcp --dport 10022 -j ACCEPT

僕は、すでに暗号鍵をもっているので、公開鍵を SAKURA のサーバーにコピーします。
ローカルのマシンから。

scp ./.ssh/id_rsa.pub xxx.xxx.xxx.xxx:/home/hoge/.ssh

サーバー側で設定を行います。

cp id_rsa.pub authorized_keys
chown hoge:hoge authorized_keys
chmod 600 authorized_keys
chmod 700 .ssh
/etc/init.d/sshd restart

という作業をしたよ。

追記) @tk0miya さんの指摘を受けて、chmod の部分を修正しました。
ありがとうございます。