Creating /dev/random
Somehow in some Linux Centos installation the /dev/random is missing. The problem is some software needs it to working well. Here is how to create it:
mknod /dev/random c 1 9
Other devices might be missing to such as /dev/urandom, /dev/null and /dev/ptmx if you need those device here is how to create it:
mknod /dev/urandom c 1 9
mknod /dev/ptmx c 5 2
mknod /dev/null c 1 3 chmod +666 /dev/null
Error: “bind to port 22 on 0.0.0.0 failed: Address already in use”
Yesterday I setup a Linux Centos server which then having problem with connection refused/dropped when I configuring it via SSH.I check the sshd log file, and see “Error: bind to port 22 on 0.0.0.0 failed: Address already in use” error message. Some web page I read said that it’s because IPv4 and IPv6 are both configured to listen SSH, we need to turn off one. Here is how to fix it:
/etc/ssh/sshd_config
Look for
Port 22 Protocol 2 #ListenAddress 0.0.0.0 #ListenAddress ::
If you use IPv4, uncomment this line:
ListenAddress 0.0.0.0
So it look like this:
Port 22 Protocol 2 ListenAddress 0.0.0.0 #ListenAddress ::
For IPv6, uncomment this one:
ListenAddress ::
So it look like this:
Port 22 Protocol 2 #ListenAddress 0.0.0.0 ListenAddress ::