I am connected to a computer over ssh. I have to reboot it remotely, while making sure that I will be able to reconnect to it over ssh just after reboot. I install 'bum' and marked sshd to be automatically started on boot. Is there a way to be completely sure that sshd will automatically start after reboot. Any help would be appreciated.
Asked
Active
Viewed 1,836 times
1 Answers
2
There are some ways. You can create a cronjob which runs at reboot to start the SSH daemon. You can create a script which runs when the network comes up and starts the SSH daemon (via Network Manager's dispatcher facility, for example). You could add a command to /etc/rc.local to start the SSH service. You could write an Upstart job (and thus duplicate some work).
However, the fact is that the SSH service is autostarted by default. As long as the network comes up fine, you should be able to SSH into the system. If the SSH service failed for some reason, there's a good chance none of the aforementioned methods would have worked anyway.
muru
- 207,228