前提
- お名前 VPS (メモリ 2G プラン)
OS のインストール
SSH サーバのインストール
pacman -S openssh
設定ファイルを開いてポート番号を 10022 などに変えておきましょう.
nano /etc/ssh/sshd_config
systemctl
から起動設定.
systemctl enable sshd
systemctl start sshd
ファイアウォールの設定
iptables
を使うのは面倒なので,ufw
をインストール.
pacman -S ufw
ファイアウォールを設定していきます.
ufw default deny
ufw limit 10022/tcp
ufw enable
Systemd から起動設定.
systemctl enable ufw