嵌入式Linux,openssh連線報錯:ssh_sandbox_violation: unexpected system call

HelloWorldyd發表於2024-04-30

背景:

使用buildroot編譯完映象,燒錄到開發板,板子上電啟動後,網路正常,ssh不能連線,sshd相同配置在其他機器上可以正常使用;

檢視核心日誌,看到連線時上報異常系統呼叫的錯誤:

Jan  1 00:01:18 NanoPC-T2 auth.crit sshd[278]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6b4d7d0) [preauth]
Apr 30 11:16:00 NanoPC-T2 auth.crit sshd[280]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6b9d7d0) [preauth]
Apr 30 11:16:15 NanoPC-T2 auth.info sshd[227]: Received signal 15; terminating.
Apr 30 11:16:15 NanoPC-T2 auth.info sshd[289]: Server listening on 0.0.0.0 port 22.
Apr 30 11:16:15 NanoPC-T2 auth.info sshd[289]: Server listening on :: port 22.
Apr 30 11:16:18 NanoPC-T2 auth.crit sshd[291]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6b9b7d0) [preauth]
Apr 30 11:17:18 NanoPC-T2 auth.info sshd[289]: Received signal 15; terminating.
Apr 30 11:17:18 NanoPC-T2 auth.info sshd[302]: Server listening on 0.0.0.0 port 22.
Apr 30 11:17:18 NanoPC-T2 auth.info sshd[302]: Server listening on :: port 22.
Apr 30 11:17:22 NanoPC-T2 auth.crit sshd[304]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6b8b7d0) [preauth]
Apr 30 11:17:23 NanoPC-T2 auth.crit sshd[306]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6b7d7d0) [preauth]
Apr 30 11:17:31 NanoPC-T2 auth.info passwd: password for root changed by root
Apr 30 11:17:34 NanoPC-T2 auth.crit sshd[309]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6b727d0) [preauth]
Apr 30 11:17:47 NanoPC-T2 auth.crit sshd[311]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6bee7d0) [preauth]
Apr 30 11:21:06 NanoPC-T2 auth.crit sshd[320]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6b217d0) [preauth]
Apr 30 11:21:08 NanoPC-T2 auth.crit sshd[322]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6bea7d0) [preauth]
Apr 30 11:21:09 NanoPC-T2 auth.crit sshd[324]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6c137d0) [preauth]
Apr 30 11:21:09 NanoPC-T2 auth.crit sshd[326]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6bbd7d0) [preauth]
Apr 30 11:21:10 NanoPC-T2 auth.crit sshd[328]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6c1c7d0) [preauth]
Apr 30 11:21:10 NanoPC-T2 auth.crit sshd[330]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6b6a7d0) [preauth]
Apr 30 11:21:10 NanoPC-T2 auth.crit sshd[332]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6b747d0) [preauth]
Apr 30 11:21:11 NanoPC-T2 auth.crit sshd[334]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6bf47d0) [preauth]
Apr 30 11:21:11 NanoPC-T2 auth.crit sshd[336]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6bb77d0) [preauth]
Apr 30 11:21:38 NanoPC-T2 daemon.info ntpd[216]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
Apr 30 11:22:05 NanoPC-T2 auth.info sshd[302]: Received signal 15; terminating.
Apr 30 11:22:07 NanoPC-T2 auth.info sshd[349]: Server listening on 0.0.0.0 port 22.
Apr 30 11:22:07 NanoPC-T2 auth.info sshd[349]: Server listening on :: port 22.
Apr 30 11:22:12 NanoPC-T2 auth.crit sshd[351]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6b947d0) [preauth]
Apr 30 11:23:09 NanoPC-T2 auth.crit sshd[353]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6ba47d0) [preauth]
Apr 30 11:23:11 NanoPC-T2 auth.crit sshd[355]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6c0c7d0) [preauth]
Apr 30 11:25:39 NanoPC-T2 auth.crit sshd[361]: fatal: ssh_sandbox_violation: unexpected system call (arch:0x40000028,syscall:403 @ 0xb6bdd7d0) [preauth]

解決方法

修改openssh的配置項,一定要取消勾選use sandboxing。

最後

具體原因是什麼,只是這樣處理後,可以正常連線了。

相關文章