|
|
昨天突然无法 ssh 到云主机,但是可以 ping 通。从控制台上看没有异常,登陆进去后发现 ssh 服务没有启动,企图启动(重启)这个服务时报错 /dev/null is not a character device!:
+ M: X( _8 a t* l0 U1 ?/ n
& c0 ^; p; i8 ]( u" ~5 B# /etc/init.d/ssh restart' @) [- E7 A5 b5 K1 t
Restarting OpenBSD Secure Shell server: sshd failed!
* r) w& K. {% I6 T5 M) V5 }2 ]. Q/dev/null is not a character device!.- ^: ~4 C% h4 S' F. |- F
# ]6 p, v# ~3 F* V& x8 n解决办法是,删除 /dev/null 后重建一个字符设备:$ }8 [. a2 H3 _6 b" w; O; Z& g
# rm -f /dev/null
0 G" l$ u- W( d# U) }. K! q- y# mknod /dev/null c 1 3$ ]( m! z+ X E
) V4 w2 A8 b7 ?1 L
然后启动(重启)ssh 就可以了:
; H& |! q' Y' i4 l2 s) I# /etc/init.d/ssh restart/ z# p1 j# C" w% W( x
Restarting OpenBSD Secure Shell server: sshd.
% J; k, u7 q f- g9 k% W3 r4 W% r' j& p9 n% A7 b
! h$ d4 V6 t9 @ @$ B* R4 h7 N! e- l
% R; [$ c' g" ~& R+ i' M. J
|
|