OpenSSH won’t start

I ran into an issue with OpenSSH Server would not start after fresh installation of it on a minimal CentOS 5 x86_64 VPS:

[[email protected] ~]# /etc/init.d/sshd restart
Stopping sshd:                                             [FAILED]
Generating SSH1 RSA host key:                              [FAILED]

I delved a little further and discovered that ssh-keygen was failing:

[[email protected] ~]# ssh-keygen 
cannot read from /dev/urandom, No such file or directory

And finally, from there, I generated the urandom file:

/sbin/MAKEDEV urandom

Also, to ensure on restarts the urandom file (as well as pty and tty) are created, I added the following to /etc/rc.d/rc.local:

/sbin/MAKEDEV pty
/sbin/MAKEDEV tty
/sbin/MAKEDEV urandom

Hopefully this helps if you run into a similar issue down the line!

Common Issues – No Networking on new OpenVZ VPS

Hello all,

Today I ran into an interesting issue where a VPS had no networking either inbound or outbound after setup. This is the error that would present when restarting network via init.d:

Bringing up interface venet0:
SIOCADDRT: Network is unreachable
SIOCADDRT: Network is unreachable

This issue also presented in that cPanel licenses could not activate not could any ping or host commands work properly. I eventually narrowed down the issue to the fact that the IPs that had been added to the VPS were not properly set to ARP by checking with the following command (run on the node):

arp | grep [INSERT IP HERE]

In order to resolve this, all I needed to do was add the arp entries for the IPs on the actual virtual environment by running the following commands on the node:

arp -s [INSERT IP HERE] `ifconfig eth0 | grep eth0 | awk '{print $5}'` pub

Make sure you run the command above for every IP on the VPS. This resolved the issue and all networking started working again properly.