A slow updating blog I write for no particular reason.

And Gibbling Sed “/s *Let their be non-standard ssh/Ports/”

We are working to automate as much as we can in regards to environment provisioning so naturally we began looking at some automation tools like Pupppy and Chef.  We hope to assign all the little things that need to be done to a fresh install of CentOS before we can give it to a team of devs.  One of these things is uncommenting Port 22 from /etc/ssh/sshd_config and configuring a nonstandard port.  With Chef I can have a recipe that can simply run a command or it can pulldown and install packages, modify attributes, generate users and a hell of alot more.  Depending on your Ruby knowledge you can automate almost anything.  I simply wanted to run a command to replace #Port 22 with Port 2202. This is where sed comes into play. I can simply have a recipe run sed -i.backup "s/^ *.*Port .*/Port 2202/" /etc/ssh/sshd_config and I’m that much closer to simply kicking off a knife bootstrap and watching all the little mundane things that need to be done to a minty fresh install.