Nethence NEWDOC OLDDOC Lab Webmail Your IP BBDock  

Setting up an SSHD failover daemon

Tune your SSH daemon as usual e.g.

cd /etc/ssh
cp -pi sshd_config sshd_config.dist
vi sshd_config

AllowGroups wheel
PermitRootLogin without-password

Create a failover config with other PORT and PID,

cp -pi sshd_config sshd_config.failover
vi  sshd_config.failover

PidFile /var/run/

Start the daemon,

/usr/sbin/sshd -f /etc/ssh/sshd_config.failover
ps aux | grep failover
ls -lhF /var/run/sshd*

and enable it at startup,

cd /etc
cp -pi rc.local rc.local.dist
vi rc.local

echo -n starting a failover ssh daemon...
/usr/sbin/sshd -f /etc/ssh/sshd_config.failover && echo done

chmod +x rc.local