login - 叉 "free"sshd?

标签 login posix fork sshd

有没有办法运行sshd以便它可以(至少对于有限数量的登录)成功返回提示(可能是 busybox),即使 fork 不可用(例如,PID 不足)?

在我看来,这应该是可能的,例如,sshd 预 fork 并保留一个池 getty s 用于服务登录请求。

最佳答案

SSHD 可以通过 -D 启动或 -d选项。

-D:

When this option is specified, sshd will not detach and does not become a daemon.
This allows easy monitoring of sshd.



-d:

Debug mode.
The server sends verbose debug output to standard error, and does not put itself in the background.
The server also will not fork and will only process one connection. This option is only intended for debugging for the server.
Multiple -d options increase the debugging level. Maximum is 3.



我想你最好的选择是运行一个单独的 SSHD进程,监听另一个端口,使用 -d选项。

因此,当“普通”SSHD 出现故障时,您仍然可以使用备用端口切换到另一个。

关于login - 叉 "free"sshd?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8406987/

相关文章:

SQL CREATE LOGON - 不能使用@parameter 作为用户名

hadoop - 无法访问ambari UI

c - msync() 是否只写入更改的页面或完全缓存的缓冲区?

c - 我如何让 child 打印杀死它的信号?

login - 无法在Firebase上部署Angle App

php - 登录脚本-尽管输入正确,用户名和密码始终为false

bash - 为什么反斜杠会阻止别名扩展?

c - 实现 perror() - 问题

python - Python 问题中从生成的线程内部 fork()

c - fork() 和 pipe() 的小问题