Let’s say you’ve got a file with the following lines:
cat file.txt
leave me alone
leave me alone
comment me out
leave me alone
comment me out also
leave me aloneComment out the lines that are begging for it:
sed -i '/comment me out/s/^/#/g' file.txt
Voila:
cat file.txt leave me alone leave me alone #comment me out leave me alone #comment me out also leave me alone
It was time to renew a couple of certs and it turned out that the CSR I had originally used was generated with a 512 bit key. Dynadot, who, by the way, offers a pretty sweet $15/year price on single root RapidSSL certs, suggested that I regenerate with a minimum of 1024 bits.
Indeed, it looks like 1024 bit key length is the minimum currently recommended. In fact, depending on whom you ask, it may already be insufficient.
NIST guidelines are comparatively optimistic, but even according to their 2007 Recommendation for Key Management, time for 1024 bit keys is passing quick.
Once again I did something that changed the host key (like rebuild the host). Now I’m trying to SSH to it and get the usual warning from SSH that the key is different. In the past, I’d open up ~/.ssh/known_hosts with VIM, enter “:” and line number SSH referred to, hit “dd” to delete it, then “:wq” to write and quit VIM, only to get warned again that the key for the IP address host is known by has also changed and do the whole dance over again.
But tonight is different. Tonight I’m gonna give the keyboard a break.
This will delete line 93 from known_hosts:
sed -i 93d ~/.ssh/known_hosts