• Mac OS X,  Mac OS X Server,  Mac Security,  Ubuntu

    Generating New SSH Keys

    Sometimes when we’re doing work, we end up changing an SSH key. You then access the host using something like this: ssh krypted@10.10.10.10 When accessing the host you then get a warning similar to the following if the key changed: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the ECDSA key sent by the remote host is aa:bb:cc:dd:ee:ff:00:11:22:33:00:11:22:33:44:55. Please contact your system administrator. Add correct host key in /home/remi/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /home/remi/.ssh/known_hosts:1 In case you…

  • Mac OS X,  Mac Security,  Mass Deployment,  Ubuntu

    Managing Core Dumps

    The core dump is a memory image of a processes in-core state that is written to the /cores directory by default and is named core followed by a . and then the pid number. So if a process with pid 87 crashes a file is written by default at /cores/core.87. The feature can be turned off using sysctl, along with the kern.coredump MIB, setting it to 0 (by default it’s 1). sysctl kern.coredump=0 To turn it back on: sysctl kern.coredump=1 Additionally, you can change the path that the files are written into, using sysctl along with the kern.corefile MIB. The corefile is an expression that by defualt writes core.%P where…

  • Ubuntu,  Unix,  VMware

    Correcting SR_BACKEND_FAILURE_46 Error in XenSource

    If you try to start a VM in XenSource and you see an error that SR_BACKEND_FAILURE_46 then one way to resolve is to detach the storage and reattach while forgetting and resetting the VM’s uuid. To do so, first locate the VM in question and go to the Storage tab to find the SR. Click Properties and add _temp to the end of the name so that you can easily find it to reattach. Then click on the Detach button for the storage. From the Console for the host, run the following (assuming the VM is called JACKED): xe vdi-list name-label= “JACKED_temp” Note the VDI UUID and SR UUID, which…

  • Mac OS X,  Network Infrastructure,  Ubuntu,  Unix

    When Packets Are Too Large in MySQL

    Every now and then you’ll see an error like “Packet Too Large” in MySQL, as seen below. When you run into this, you’re trying to shove more information into a given SQL statement than is allowed. So to fix, you have a few different options, starting with the best, which is to make your SQL better. But not everyone has control of things like source code. So you might need to change the value in mysql itself. To do so, simply run the mysql command with the –max_allowed_packet and then put = followed by the size of the packet. For example, to make it 128: mysql --max_allowed_packet=128M Now, by default…

  • Mac OS X,  Mac OS X Server,  Mac Security,  Ubuntu,  Unix

    Leveraging The Useful Yet Revisionist Bash History

    Not, this article is not about 1984. Nor do I believe there is anything but a revisionist history. Instead, this article is about the history command in OS X (and *nix). The history command is a funny beast. Viewing the manual page for history in OS X nets you a whole lotta’ nothin’ because it’s just going to show you the standard BSD General Commands Manual. But there’s a lot more there than most people use. Let’s take the simplest invocation of the history command. Simply run the command with no options and you’ll get a list of your previously run bash commands: history This would output something that looks…

  • Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment,  Ubuntu,  Unix

    Using allmemory To Test Memory in OS X

    Earlier I wrote an article on testing memory using memtest. Memtest actually looks at the memory in a system and checks it for errors. But what about checking the systems use of memory for problems? Well, OS X has a built-in tool call allmemory that can check system or per process memory. In its most simple incantation allmemory can just be run with no options: allmemory This is going to result in a few errors if only because allmemory is getting a little long in the tooth. But you can also scan on a per-process basis. To do so, run allmemory with a -proc option and then the pid for…

  • Active Directory,  Mac OS X,  Mac OS X Server,  Mac Security,  Network Infrastructure,  Ubuntu,  Unix,  VMware,  Windows Server,  Windows XP,  Xsan

    List All DNS Records For A Domain

    Sometimes you want to move a domain but you don’t have a copy of the zone file in order to recreate records. The easy way to do this is to grab a zone transfer. To do so, dig is your friend: dig -tAXFR mycompany.com Sometimes though (and actually more often than not) a zone transfer is disabled. In that case you’ll need to dig the domain a bit differently. I like to use +nocmd, query for any and list the results (+answer): dig +nocmd https://krypted.com/ any +answer Which results in the following: ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39183 ;; flags: qr rd ra; QUERY: 1,…

  • Network Infrastructure,  Ubuntu,  Unix,  VMware

    Using the XenSource Command Line Interface

    XenSource has some pretty good GUI tools. There’s XenCenter and the xsconsole, both of which are pretty adequate in a free sense and get pretty darn interesting when you actually pay Citrix. But today I want to take a little look under the hood of XenSource. I had previously written about Xen. But note that this is a different beast. Before I get started talking about how to do some tasks in XenSource, I first want to throw out there a few terms. The first, is virtual machine. This is exactly what it sounds like, an operating system that runs on a virtual host rather than a physical hosts. So…

  • Ubuntu,  Unix,  VMware

    Some Basic Xen Commands

    The most important command for managing pretty much anything in Linux is vi. So if you only learn one command, learn that one. But if you want to learn another, the second most important command for managing Xen is then xm (well, once you’ve apt-gotten or yummied up the installation that is). The xm command has a number of easy verbs, each used for managing the Xen environment. xm info – Shows information about the Xen host xm list – Shows information about doms (states include r for running, b for blocked, c for crashed, p for paused and the worse, d for dying). xm network-list – Shows virtual interfaces…