General Tips on Using/Setting up SSH Keys

  • $ represents a priveleged command prompt. Do not copy/type it with below commands.
  • # represents an unpriveleged command prompt. Do not copy/type it with below commands.
  • ~ is like an alias for the current user's home directory
  • On remote server, create .ssh directory in the home directory of the user with which you will be logging in
    # mkdir ~/.ssh
  • Ensure ~/.ssh is owned by the correct username and groupname
    # ll ~
  • Set permissions for ~/.ssh to 0700
    # chmod 0700 ~/.ssh
  • Create the file authorized_keys
    # touch ~/.ssh/authorized_keys
  • Ensure ~/.ssh/authorized_keys is owned by the correct username and groupname
    # ll ~/.ssh
  • Set permissions for ~/.ssh/authorized_keys to 0600
    # chmod 0600 ~/.ssh/authorized_keys
  • selinux is beyond the scope of this article, but if it is in permissive or enforcing mode, you need to set the correct context for ~/.ssh
    $ restorecon -R -v ~/.ssh

Ever seen a dynamically partitioned Kickstart Script?

...Maybe, but likely not. With good reason. It's surprisingly difficult.

You have to take a step back and think about drive space in general.

What is a byte(B)?

How big is your drive? 100GB you say? Is that 100gigabytes(GB) or 100gibibytes(GiB)

I personally struggle with this on a daily basis. I learned it the wrong way and never looked back...

until I started trying to create a dynamically partiitioned kickstart script for an ISO, that is.

bit(b) The most basic unit of information for classic computing; a binary digit; a representation of a '1' or a '0'; 'On' or 'Off'

byte(B) Essentially, 8 bits(b)

kilobyte(kB) ...Ah, here is where my foundation begins to crumble. A kilobyte(kB)(Note: the 'k' is lower case) is actually a Decimal system unit of 1,000 bytes(B). You might think, "uhhh, no it isn't, it's 1,024 bytes(B)". You and I would both were taught incorrectly then. A kilobyte is also 8,000 bits(b)

kibibyte(KiB) This is the Binary system unit of 1,024 bytes(B); or 8,192 bits

megabyte(MB) ...again, not what I had originally thought. A megabyte(MB) is the Decimal system unit of 1,000 kilobytes(kB), or 1,000,000 bytes(B), or 8,000,000 bits(b)

mebibyte(MiB) This is the Binary system unit of 1,024 kibibytes(KiB), or 1,048,576 bytes(B), or 8,388,608 bits(b)

gigabyte(GB) A gigabyte(GB) is the Decimal system unit of 1,000 megabytes(MB), or 1,000,000 kilobytes(kB), or 1,000,000,000 bytes(B), or 8,000,000,000 bits(b)

gibibyte(GiB) This is the Binary system unit of 1,024 mebibytes(MiB), or 1,048,576 kibibytes(KiB), or 1,073,741,824 bytes(B), or 8,589,934,592 bits(b)

Enough with the Math!

But wait! There's more...

I think the biggest source of confusion in this, is the standards bodies. They all disagree, constantly. At least one of the bodies, JEDEC, uses the same unit notation in Binary, as Decimal uses. so a 1,000 Byte (kilobyte) = 1,024 Byte JEDEC (kilobyte). Talk about making it difficult to keep it straight. Wikipedia has an interesting chart on this as well as links to a couple of the standards' pages.

So what does this have to do with Kickstart?

In kicstart configuration files, you usually manually specify a partitions size in MB on one line.

Sometimes it would be a whole lot easier if you could just reimage a server, the exact way it was before. Say for example, you need the same IP information, hostname, pre-installed apps, etc.. You can create a custom ISO image using the release version of the ISO as a starting point. Then you can either