DropBear SSHサーバーが正しく起動しません。

DropBear SSHサーバーが正しく起動しません。

私が構成したドロップベアSSHLinux(Ubuntu 22.04)マシンで。私が使用している構成は次のとおりです。

$ cat /etc/dropbear-initramfs/config 
#
# Configuration options for the dropbear-initramfs boot scripts.
# You must run update-initramfs(8) to effect changes to this file (like
# for other files under the '/etc/dropbear-initramfs' directory).

#
# Command line options to pass to dropbear(8)
#
# -I 0: disables idle timeouts for innactivity
# -s: disable passwords
DROPBEAR_OPTIONS="-p 2222 -I 0 -s"

#
# On local (non-NFS) mounts, interfaces matching this pattern are
# brought down before exiting the ramdisk to avoid dirty network
# configuration in the normal kernel.
# The special value 'none' keeps all interfaces up and preserves routing
# tables and addresses.
#
#IFDOWN=*

私はマシンを手動でシャットダウンしてテストしました。起動後すぐにサーバーが起動し、サーバーに接続できます。ただしsudo reboot、マシン自体で実行すると、再起動後にサーバーが起動せず、DropBearのSSHサーバーに接続できなくなります(マシンのログにはDropBearが実行中とマークされますが、2222ではマシンに接続できません)。

動作しているように見える唯一のシーケンス(ほぼ毎回)マシンを再起動し、次の操作を行った場合:

$ sudo -i
# echo 1 > /proc/sys/kernel/sysrq
# echo b > /proc/sysrq-trigger

なぜそうなのかはよくわかりませんが、上記の2つの方法がマシンを再起動するために送信する信号が異なると推測されます。これが問題になる可能性がありますか?コンピュータを再起動して再起動した後にDropBearを実行する最良の方法は何ですか?

ベストアンサー1

構成ファイルのパスが変更されたようです。少なくともそのため、最近同様の問題が発生しました。ディレクトリが次に変更されました。

/etc/dropbear-initramfs/

到着

/etc/dropbear/initramfs/

設定をファイルに入れてみてください/etc/dropbear/initramfs/dropbear.conf

ディレクトリの変更はファイルauthorized_keysなどに影響を与えることに注意してください。

おすすめ記事