• Mac OS X Server

    Use SSH, ARD, SNMP, And The Server App Remotely on Server 5.4

    SSH allows administrators to connect to another computer using a secure shell, or command line environment. ARD (Apple Remote Desktop) allows screen sharing, remote scripts and other administrative goodness. You can also connect to a server using the Server app running on a client computer. To enable any or all of these, open the Server app (Server 5.4 for High Sierra), click on the name of the server, click the Settings tab and then click on the checkbox for what you’d like to enter.  All of these can be enabled and managed from the command line as well. The traditional way to enable Apple Remote Desktop is using the kickstart…

  • cloud,  Mac OS X,  Ubuntu,  Unix

    Scripting Instances On Google Cloud From A Mac

    Over the users I’ve written a good bit about pushing a workload off to a virtual machine sitting in a data center somewhere. The Google CloudPlatform has matured a lot and I haven’t really gotten around to writing about it. So… It’s worth going into their SDK and what it looks like from a shell using some quick examples. For starters, you’ll need an account with Google Cloud Platform, at cloud.google.com and you’ll want to go ahead and login to the interface, which is pretty self-explanatory (although at first you might have to hunt a little for some of the more finely grained features, like zoning virtual instances. The SDK…

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

    To Hex And Back

    The xxd is a bash command in Linux and macOS that is used to take a hexdump (convert a string to hex), or convert hex back to a string. To use xxd, just call it with a couple of options. Below, we’ll use the -p option to export into plain hexdump, and we’ll quote it and the <<< is to take input rather than a file name to convert (the default behavior), as follows: xxd -p <<< "hey it's a string" The output would be a hex string, as follows: 6865792069742773206120737472696e670a Then use the -r option to revert your hex back to text. Since xxd doesn’t allow for a positional…

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

    Configure SSH, ARD and SNMP In OS X Yosemite Server

    SSH allows administrators to connect to another computer using a secure shell, or command line environment. ARD (Apple Remote Desktop) allows screen sharing, remote scripts and other administrative goodness. SNMP allows for remote monitoring of a server. You can also connect to a server using the Server app running on a client computer. To enable all of these except SNMP, open the Server app (Server 3), click on the name of the server, click the Settings tab and then click on the checkbox for what you’d like to enter. All of these can be enabled and managed from the command line as well. The traditional way to enable Apple Remote…

  • cloud,  Mac OS X

    One Liner To Install gcloud for Managing App Engine Instances

    I had previously been using the gcutil command. But I cheated a little with the one liner promise to get the new tool, gcloud, installed: curl https://dl.google.com/dl/cloudsdk/release/install_google_cloud_sdk.bash | bash ; unzip google-cloud-sdk.zip ; ./google-cloud-sdk/install.sh The installation shell script is interactive and will ask if you want to update your bash profile. Once run, kill your terminal app and the new invocation will allow you to log into App Engine using the gcloud command followed by auth and then login: gcloud auth login Provided you’re logged into Google using your default browser, you’ll then be prompted to Accept the federation. Click Accept. The gcloud command can then be used to check…

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

    Working With Files Whose Name Starts with a “-“

    Recently I needed to create a bunch of files that had names starting with a dash. If you simply run touch followed by the filename, if the filename starts with a dash, it will throw an error that there’s an illegal option. Therefore, you must escape out the dash by passing a double dash in front of it. For example, to create a file with a dash in the name, use the following syntax: touch -- -man Likewise, to remove that file: rm -- -man You can also use the double dash when passing commands to ssh rather than have ssh interpret them as arguments, making it useful for command…

  • Mac OS X Server

    Enable SSH, ARD, SNMP & the Remote Server App Use In OS X Server (Mavericks)

    SSH allows administrators to connect to another computer using a secure shell, or command line environment. ARD (Apple Remote Desktop) allows screen sharing, remote scripts and other administrative goodness. SNMP allows for remote monitoring of a server. You can also connect to a server using the Server app running on a client computer. To enable all of these except SNMP, open the Server app (Server 3), click on the name of the server, click the Settings tab and then click on the checkbox for what you’d like to enter. All of these can be enabled and managed from the command line as well. The traditional way to enable Apple Remote…

  • 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 OS X Server,  Mac Security,  Xsan

    Update the Promise Vtrak Firmware Using SSH

    Updating the firmware on Promise arrays is straight forward enough from the WebPAM. But what happens if a firmware update goes funky and you can’t get into the WebPAM any longer (ah, the joys of beta testing)? Well, you can always download an older firmware and reload it provided you can ssh or telnet into the host. Download from http://www.promise.com/support/download.aspx?m=93&region=en-global for your given model. Then, you need the firmware accessible to the Promise chassis via tftp. A simple tftp GUI tool is available at http://ww2.unime.it/flr/tftpserver. Once configured, log into the Promise array and then use the ptiflash command to update the firmware. In the following command we’ll use the -s option to identify…