首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >DropBear SSH服务器没有正确启动。

DropBear SSH服务器没有正确启动。
EN

Unix & Linux用户
提问于 2023-01-03 09:22:14
回答 1查看 504关注 0票数 0

我已经在Linux (Ubuntu22.04)机器上配置了DropBear SSH。我使用的配置如下:

代码语言:javascript
复制
$ 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年无法到达)。

唯一能够工作的顺序(每次都会出现几乎)是如果我重新启动机器时:

代码语言:javascript
复制
$ sudo -i
# echo 1 > /proc/sys/kernel/sysrq
# echo b > /proc/sysrq-trigger

我不完全确定为什么,但我想,发送给重启机器的信号在上述两种方法之间是不同的。这会是问题吗?重启计算机并在重启后运行DropBear的最佳方法是什么?

EN

回答 1

Unix & Linux用户

发布于 2023-01-07 22:58:09

配置文件路径似乎已经发生了变化,至少最近我遇到了类似的问题。目录更改为

代码语言:javascript
复制
/etc/dropbear-initramfs/

代码语言:javascript
复制
/etc/dropbear/initramfs/

尝试将您的配置放入文件/etc/dropbear/initramfs/dropbear.conf中。

请注意,目录的更改也会影响例如authorized_keys文件。

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/730377

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档