嵌入式Linux,openssh连接报错:ssh_sandbox_violation: unexpected system call
背景:
使用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。
最后
具体原因是什么,只是这样处理后,可以正常连接了。