LoginSignup
2
5

More than 5 years have passed since last update.

自分用メモ。書き途中。

kusanagiは、CentOS 7ベースっぽい。

kusanagiコマンド

sshのユーザを決めて、鍵生成はできない?
kusanagi init時に作成する

かなり扱いにくい。

ssh用ユーザ作成

  • つくる!
  • wheelに追加

sshd_configの設定

  • ポート変更 /etc/ssh/sshd_config
#Port 22
Port 55555

#Protocol 2
Protocol 2

#PermitRootLogin yes
PermitRootLogin no

#PubkeyAuthentication yes
PubkeyAuthentication yes

PasswordAuthentication yes
PasswordAuthentication no

sshdの再起動

systemctl restart sshd.service

firewallのポート開ける、閉じる

port 55555を通す

# firewall-cmd --add-port=55555/tcp
success
# firewall-cmd --permanent --add-port=55555/tcp
success

port 22を閉じる

# firewall-cmd --remove-service=ssh
success
# firewall-cmd --permanent --zone=public --remove-service=ssh
success

参考
KUSANAGIにSSHでつなぐためにセキュリティを強化する | 有限工房
SSH のポートを変更する - ConoHa で KUSANAGI その3 - IMPOV::In My Point Of View

2
5
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
2
5