OpenSSH 8.9 Configuration for Ubuntu22
version 0.1.5
xxxは任意で変更してください
~$ mkdir xxx
~$ cd xxx
xxx$ git clone https://github.com/ns29qrk/sshd_config.git .
xxx$ sudo cp sshd_config /etc/ssh/sshd_config.d/xxx_sshd_config.conf
xxx$ cd ..
~$ rm -Rf xxx
必要がれば「Port 49152」を変更してください。
~$ sudo vim /etc/ssh/sshd_config.d/xxx_sshd_config.conf
#D Port 22
-Port 49152
+Port 55522
変更できるポート番号は22または49152から65535までとなっています。
それ以外も設定はできますが、他のサービスとバッティングするかもしれません。
*注 ) ここで設定している55522はサンプルです。
~$ sudo systemctl restart sshd.service
Port番号を変更
Subsystem Sftpコメントアウト
CompressionLevel削除
HashKnownHosts削除
CheckHostIP削除
HostKeyAlgorithmsの修正
PubkeyAcceptedKeyTypesの修正
初稿