diff --git a/content/20240211171220 sshのポートを変更する.md b/content/20240211171220 sshのポートを変更する.md index a9f78a0..89c14b4 100644 --- a/content/20240211171220 sshのポートを変更する.md +++ b/content/20240211171220 sshのポートを変更する.md @@ -5,7 +5,15 @@ ## 変更の方法 ### サーバー側 -`/etc/ssh/sshd_config` を編集すればよい。 +Raspberry piの場合、 20240409 では、`/etc/ssh/sshd_config` を編集すればよい。 +x86-64でUbuntu/Debianを使用していて、下記の方法をやるには、以下実行が必要(非推奨) +``` +# systemctl disable --now ssh.socket +# rm -f /etc/systemd/system/ssh.service.d/00-socket.conf +# rm -f /etc/systemd/system/ssh.socket.d/addresses.conf +# systemctl daemon-reload +# systemctl enable --now ssh.service +``` `# Port 22` とコメントアウトされている所があるので、 `#`を削除。 22を別のポートに設定する。