Calculating a SSH host key with paramiko

  • Post author:
  • Post category:Python

I needed to compare a host key from something other than a known_hosts file with what paramiko reports as part of the SSH connection today. If you must know, the host keys for these machines are retrieved a XMLRPC API... It turned out to be a lot easier than I thought. Here's how I produced the host key entry as it appears in that API (as well as in the known_hosts file): #!/usr/bin/python # A host key calculation example for Paramiko. # Args: # 1: hostname import base64 import os import paramiko import socket import sys # Socket connection to remote host sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((sys.argv[1], 22)) # Build a SSH transport t = paramiko.Transport(sock) t.start_client() key = t.get_remote_server_key() print '%s %s' %(key.get_name(), base64.encodestring(key.__str__()).replace('\n', '')) t.close() sock.close() Note that I could also have constructed a paramiko key object based on the output of the XMLRPC API and then compared those two objects, but I prefer the human readable strings.

Continue ReadingCalculating a SSH host key with paramiko

Bio of a Space Tyrant: Refugee

  • Post author:
  • Post category:Book

I'm not really sure what I think about this book. Its well written, and very readable, but depressing. The book starts with a sexual assault, and then moves on to describe what its like to be the minimum wage labor in a space colony. The short answer -- its not much fun. Worse than that, when you try to escape your oppression, you end up being abused by both the authorities who have power to help, as well as assorted criminals. This is not a feel good book. [isbn: 0380841940]

Continue ReadingBio of a Space Tyrant: Refugee

Daughter of the Empire

  • Post author:
  • Post category:Book

This is a really good book. It was a delight to find something so good that it kept me up well past my bed time several nights running. I really enjoyed this one -- its set on Kelwan, the planet that invades Midkemia in the Riftwar series, and is written from the perspective of the invaders. [isbn: 055327211x]

Continue ReadingDaughter of the Empire

Isaac Asimov’s Robot City: Prodigy

  • Post author:
  • Post category:Book

This is the fourth book in the Robot City series, which is based in Asimov's Foundation universe. This one follows Odyssey, Suspicion and Cyborg. This book has quite a different style, the robot characters using quite convoluted sentences, which I found annoying. It is a little jarring in this series that each book is by a different author -- it takes me a little while to transition between the authors' various styles when I read them, especially when they're back to back. I think what Cover was trying to achieve is a more intellectual style of book than the others in the series, and it suffers the same fate as the Benford's Foundation's Fear -- the style is out of place with the rest of the books in the series, and that decreases from the enjoyment to be derived from this book. The actual plot line is fine though, if a little simplistic. Because of the very verbose style, it feels like less happened in this book than the others (which are of similar length). Overall, a bit of a disappointment.

Continue ReadingIsaac Asimov’s Robot City: Prodigy

Isaac Asimov’s Robot City: Cyborg

  • Post author:
  • Post category:Book

This is the third book in the Robot City series, which is based in Asimov's Foundation universe. This one follows Odyssey and Suspicion, and is a pretty good book. Its also a very fast read. The robot-wandering-the-city subplot is very reminiscent of Caliban, which is yet another Asimov spinoff. The plot lines are different enough that it doesn't feel like a rehash, but there are certainly strikingly similar elements. I liked this book.

Continue ReadingIsaac Asimov’s Robot City: Cyborg

Polgara the Sorceress

  • Post author:
  • Post category:Book

This is the final continuation of the Belgariad and the Malloreon series, following on from the Belgarath the Sorcerer continuation. The two continuation books are really just the same stories told from other perspectives, yet Belgarath the Sorcerer managed to be a really interesting read. It probably helped that Belgarath's story predates the Belgariad by thousands of years. On the other hand, most of the territory covered in this book is not new. This book started well, but the tone quickly became annoying for me. I think it was the several hundred pages of Arendish history that ruined it for me -- its just not that interesting where Polgara's bathroom is located, and who won a particular jousting match. There are also these really annoy asides littered throughout the text. The same element appeared in Belgarath, but seemed less annoying there for some reason. It annoyed me that there would be a passage of prose, broken in the middle with supposedly witty comment, which invariably fell flat. The other problem with this book is that Polgara herself comes across as a bit of a sociopath. She's always sure of herself, and lacks depth as a character because of it. I've…

Continue ReadingPolgara the Sorceress

MythBuntu 8.10 just made me sad

  • Post author:
  • Post category:Mythtv

I figured it was time to give MythBuntu a try, so I set up a MythBuntu 8.10 instance in VirtualBox today. That was a mistake. I'm not 100% sure I understand how it happened, but MythBuntu somehow managed to delete my entire mythconverg MySQL database instance. Not pleased. I've restored it from last night's backup, but now I'll need to recover recordings which happened today, assuming I can be bothered. I'm writing this just as a warning to others -- if you're playing with MythBuntu, backup your MySQL instance if its not a test one.

Continue ReadingMythBuntu 8.10 just made me sad

Darkspell

  • Post author:
  • Post category:Book

This is the second book in the Deverry series, and I liked it. Its a direct continuation of Daggerspell, and deals with Rodrhys and Jill's life on the road. [isbn: 0553568884;0586200797]

Continue ReadingDarkspell

The state of Blu Ray on Linux / MythTV

  • Post author:
  • Post category:Mythtv

The DVD drive in one of my MythTV machines has given up the ghost. I have to go to Fry's tomorrow to replace a dead hard disk, so I'll pick up a new drive while I am at it. I am surprised to discover that Blu Ray drives are now just $90. I wonder what the state of Blu Ray playback on Linux is like at the moment. How's the MythTV support? Time to find out.

Continue ReadingThe state of Blu Ray on Linux / MythTV

End of content

No more pages to load