CentOS 6: Setup SSH to run on startup

CentOS 6: Setup SSH to run on startup

By default with CentOS 6 SSH is not configured to run on startup.

Meaning you will have to activate the service every time before being able to use SSH on the CentOS server.

To enable SSH to run on boot run the following command.

chkconfig sshd on

This can be applied to any service you want to run on boot. Once this is done restart the server and SSH will be started.

Leave a Reply

9 Comments on "CentOS 6: Setup SSH to run on startup"

Leave a Reply

Sort by:   newest | oldest | most voted
matt
Guest

Fantastic, just what i needed

manco1911
Guest

daniel, this is the second time you are making my life easier.
Keep up the good work !

Craig
Guest

No need to restart the server. Just do:

service sshd start

J. Canuck
Guest

Nice suggestion, but still doesn’t seem to work on my CentOS 6.4 box. Whenever I restart the system, the sshd service shows up as ‘dead’. If I do a manual start, all is well, but I can’t for the life of me get it to start automatically on reboot.

Elijah .R
Guest

Try

systemctl enable sshd

that works as well i believe

J. Canuck
Guest
Well, as it turns out, there were a couple of issues interaction with each other — here is a summary of the resolution (huge thanks to ‘Wolfy’ on the #centos irc channel). 1\ in my sshd_config, I had sshd bind to my fixed ip: port 22 ListenAddress my.fixed.ip.here:22 2\ if I commented out the ListenAddress line, then sshd came up on reboot, as expected. But, if I uncommented ListenAddress, then sshd would not come up on boot. Although I could start if from console. 3\ this was the big clue — it suggested (subsequently confirmed) that sshd was trying to… Read more »
Craig Twofoot
Guest

Thanks! Worked great.

wpDiscuz