|
|
昨天突然无法 ssh 到云主机,但是可以 ping 通。从控制台上看没有异常,登陆进去后发现 ssh 服务没有启动,企图启动(重启)这个服务时报错 /dev/null is not a character device!:2 l5 y3 Z) B8 ^/ O+ F
8 G/ b6 m. M: g
# /etc/init.d/ssh restart
% n& l" K8 _' L3 u5 e% tRestarting OpenBSD Secure Shell server: sshd failed!
) k9 c8 } @# k- R" Q& b) ^3 a6 K/dev/null is not a character device!.
/ L2 i5 I b/ S- a- ~* |: k
! }/ x) c, V5 `1 r, I1 T解决办法是,删除 /dev/null 后重建一个字符设备:
2 B# p9 R/ T6 U5 `: F3 e# rm -f /dev/null
% R3 x, `- @; ]2 P3 z' H$ B6 T# mknod /dev/null c 1 3
+ r+ S. f1 ?4 u+ c: I. }
+ I+ J3 W4 T) q7 M# M然后启动(重启)ssh 就可以了:
5 \' }5 {- I B9 E; X8 ], a7 h# /etc/init.d/ssh restart" X4 l7 T0 V7 V6 E k. U! ~
Restarting OpenBSD Secure Shell server: sshd.5 |$ y1 K/ G+ t) }& e
* z1 @* H& I: Y( ]8 w2 a) s3 u
' }8 a: p+ q) e" I5 s9 u
$ [) H. S1 |8 z+ e+ b |
|