我有一个 AIX 服务器突然停止为 SSH 连接提供服务。当我尝试通过startsrc -s sshd启动服务时,它说:
0513-059 The sshd Subsystem has been started. Subsystem PID is 258300.
然而,发出命令后,服务状态立即显示为无效:
sshd ssh inoperative
初始化脚本的位置很好,并且抛出与上面相同的结果。
编辑:这是 odmget 命令输出:
SRCsubsys:
subsysname = "sshd"
synonym = ""
cmdargs = "-D"
path = "/usr/sbin/sshd"
uid = 0
auditid = 0
standin = "/dev/console"
standout = "/dev/console"
standerr = "/dev/console"
action = 1
multi = 0
contact = 2
svrkey = 0
svrmtype = 0
priority = 20
signorm = 15
sigforce = 9
display = 1
waittime = 20
grpname = "ssh"
当尝试手动启动该服务时,出现以下错误:
exec(): 0509-036 Cannot load program /usr/sbin/sshd because of the following errors:
0509-150 Dependent module libz.a(libz.so.1) could not be loaded.
0509-022 Cannot load module libz.a(libz.so.1).
0509-026 System error: A file or directory in the path name does not exist.
任何帮助将不胜感激。
答案1
您可以尝试以下操作:
1)LogLevel DEBUG3
启用/etc/ssh/sshd_config
2)添加security.debug /var/log/syslog.security.debug rotate time 1d files 4
字符串/etc/syslog.conf
3)然后
# touch /var/log/syslog.security.debug
# stopsrc -s syslogd
# startsrc -s syslogd
# stopsrc -s sshd
# startsrc -s sshd
答案2
您的系统上似乎libz.so.1
缺少该文件。
答案3
问题是没有libz.a
in /etc/opt/freeware/lib
.
使用命令并查找libz
:
find / -name 'libz*' -exec ls -l {} \; 2>/dev/null
之后,将库复制到/opt/freeware/lib/
.例子:
cp /opt/freeware/lib/saveoldrpm/oldrpm/lib/libz.a /opt/freeware/lib
startsrc -s sshd