红联Linux门户
Linux帮助

Linux /dev/null对ssh登录的影响

发布时间:2014-08-07 15:46:44来源:linux网站作者:wujingfeng

远程ssh出现报错:ssh_exchange_identification: Connection closed by remote host

到现场发现,现场也不能使用ssh,一些应用也无法使用,例如apache等.


下面是messages信息

Jul 15 00:05:08 www udevd-event[13318]: run_program: open /dev/null failed: No such device or address
Jul 15 00:05:08 www udevd-event[13319]: run_program: open /dev/null failed: No such device or address
Jul 15 00:05:08 www udevd-event[13320]: run_program: open /dev/null failed: No such device or address
Jul 15 00:05:08 www udevd-event[13322]: run_program: open /dev/null failed: No such device or address
Jul 15 00:48:14 www smbd[13403]: [2010/07/15 00:48:14, 0] lib/util.c:close_low_fds(698)
Jul 15 00:48:14 www smbd[13403]:  Can't open /dev/null
Jul 15 03:09:13 www smbd[13668]: [2010/07/15 03:09:13, 0] lib/util.c:close_low_fds(698)
Jul 15 03:09:13 www smbd[13668]:  Can't open /dev/null
Jul 15 05:43:13 www smbd[15774]: [2010/07/15 05:43:13, 0] lib/util.c:close_low_fds(698)
Jul 15 05:43:13 www smbd[15774]:  Can't open /dev/null


解决方法

/dev/null这个文件有问题
rm /dev/null
mknod /dev/null c 1 3
chmod 666 /dev/null

问题解决。