All posts by admin

RHEL6 NIC order

udev in RHEL6 enumerates devices based on information stored in

/etc/udev/rules.d/70-persistent-net.rules

When adding/changing NICs in VMware, you may need to edit this file to adjust the order. Alternately, you can delete the file and let the system rebuild it on the next restart.

Regenerate SSH key material

All this can be done in an ssh session, however if anything goes wrong, you’ll need console access to fix the problem.

Generate new candidate primes

ssh-keygen -G moduli-2048.candidates -b 2048

Screen primes for suitability

ssh-keygen -T moduli-2048 -f moduli-2048.candidates

Install in ssh config root, backup old moduli:

cd /etc/ssh

mv moduli moduli.bak

mv moduli-2048 moduli

backup existing private/public keys:

for i in *_key;do mv $i $i.bak;done

for i in *.pub;do mv $i $i.bak;done

Generate new keys:

ssh-keygen -A

Restart sshd:

/etc/init.d/sshd restart

Verify this by logging out and back in. Your ssh client should bark that the host key has changed. Once you clear the line from .ssh/known_hosts (or the equivalent) you should be able to log in again.

At that point you should delete the old keys and candidate moduli

Generating PDFs using Ghostscript

The following command (re)generates a pdf from the source file. In this particular case it is being invoked to fix improperly written pdf. but it could just as well be used to make a pdf from an jpg file.

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.7 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=Aaron_Taylor_APPLICATION_2014-04-30_20-58-new7.pdf Aaron_Taylor_APPLICATION_2014-04-30_20-58.pdf