Category: Hacking

  • Shell Nuggets: Musing on Dates

    Nigh ever day I happen across some gem tucked away in the opaque vista of the *nix command-line shell.   While attempting to contrive the proper arguments for a date command interpolation, the following editorial injection from its GNU info entry caught my fancy.

    28 Date input formats
    *********************
    First, a quote:
    Our units of temporal measurement, from seconds on up to months,
    are so complicated, asymmetrical and disjunctive so as to make
    coherent mental reckoning in time all but impossible. Indeed, had
    some tyrannical god contrived to enslave our minds to time, to
    make it all but impossible for us to escape subjection to sodden
    routines and unpleasant surprises, he could hardly have done
    better than handing down our present system. It is like a set of
    trapezoidal building blocks, with no vertical or horizontal
    surfaces, like a language in which the simplest thought demands
    ornate constructions, useless particles and lengthy
    circumlocutions. Unlike the more successful patterns of language
    and science, which enable us to face experience boldly or at least
    level-headedly, our system of temporal calculation silently and
    persistently encourages our terror of time.
    ... It is as though architects had to measure length in feet,
    width in meters and height in ells; as though basic instruction
    manuals demanded a knowledge of five different languages. It is
    no wonder then that we often look into our own immediate past or
    future, last Tuesday or a week from Sunday, with feelings of
    helpless confusion. ...
    -- Robert Grudin, `Time and the Art of Living'.
    This section describes the textual date representations that GNU
    programs accept. These are the strings you, as a user, can supply as
    arguments to the various programs. The C interface (via the `get_date'
    function) is not described here.
    
    

    Now back to work.

     

  • ssh: no matching cipher found

    After a recent Ubuntu upgrade on my home machine, ssh attempts to it from the VirtualBox instance at work stopped working.   Here’s what ssh spewed back at me:

      no matching cipher found: client blowfish-cbc,arcfour server aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com

     

    Impatient, I just logged in from another machine.  The VM runs CentOS 5.10 so that its environment is comparable with what [used to be] present on the majority of our production servers.   I’m an anti-RedHat bigot in the first place, and didn’t want to hunt down repos and upgrade my ssh.

    That was not necessary.  The problem was a “Ciphers” line I’d added to my ~/.ssh/config, intended to prefer  (“Googallegedly”) faster encryption methods.   Adding all but those that resemble email addresses seems to have fixed the issue.   My “Ciphers” line now looks like this:

      Host *
      Ciphers blowfish-cbc,arcfour,aes128-ctr,aes192-ctr,aes256-ctr

     

    The ciphers may be defined in your system /etc/ssh/ssh_config.  Check around.  If you can’t find it anywhere, try this:

      sudo find  ~/.[a-z]* /etc -path '*ssh*' -type f | sudo xargs fgrep Cipher

     

    Anyway, that was my fix.   Right on in, easy-peasy lemon-squeezy.

     

  • Rabbit-hole: From DNS To Hacker Wisdom

    Waiting for a DNS change today, using <tt>dig</tt> to check the propagation, did a `man dig`, found mention of Chaosnet and Hesiod classes,

    the latter having been developed within the Athena Project, which also gave us the X Window System:

    In 1984, Bob Scheifler and Jim Gettys set out the early principles of X:[2]

    • Do not add new functionality unless an implementor cannot complete a real application without it.

    • It is as important to decide what a system is not as to decide what it is. Do not serve all the world’s needs; rather, make the system extensible so that additional needs can be met in an upwardly compatible fashion.

    • The only thing worse than generalizing from one example is generalizing from no examples at all.

    • If a problem is not completely understood, it is probably best to provide no solution at all.

    • If you can get 90 percent of the desired effect for 10 percent of the work, use the simpler solution. (See also Worse is better.)

    • Isolate complexity as much as possible.

     

    Wisdom for the aging.