An SSH public keyserver - Moxida网摘

Moxida网摘

When I figure it out, I will let you know…
  • 首 页
  • About
  • Archives
  • Tags
Moxida.com Project Code    Posts    Comments

An SSH public keyserver

Monday, September 29th, 2008

I spent a few nights working on a web site recently — it’s a public OpenSSH keyserver, in the style of the OpenPGP keyservers, and it’s up now. I’d like to attempt to persuade you all to consider uploading your public SSH keys to http://sshkeys.net/, for a few reasons:

  • If you publish your public key, it’s going to be easy for people setting up accounts for you in the future to find it, with a simple wget sshkeys.net/you@yourdomain.com.

  • If you manage machines, having your potential users upload keys to the site should save your time by making sure they get past problems like uploading the wrong file, since the site will tell them if they try to upload anything other than a public key.

  • There should be side benefits of having a large repository of SSH public keys: I think we would have detected the recent Debian/OpenSSL randomness bug sooner if we’d been on the lookout for unexpected duplicate keys, for example.

I used Django for the site and it was shockingly effortless, to the point where I didn’t have to write any SQL or interact with the database manually. I wrote the following model, which says that there are Addresses, Keys, and combinations of Address and Key that have some extra fields like whether they’ve been verified against the supplied e-mail address or not:

class Address (models.Model):
    address = models.CharField(max_length=255)
    def __unicode__(self):
        return self.address

class SSHKey (models.Model):
    owners = models.ManyToManyField(Address, through='AddressKey')
    keytext = models.CharField(max_length=1024)
    def __unicode__(self):
        return self.keytext

class AddressKey:
    address = models.ForeignKey(Address)
    sshkey = models.ForeignKey(SSHKey)
    date_added = models.DateTimeField('date added')
    verified = models.BooleanField(default=False)
    token = models.CharField(max_length=40)
    token_sent = models.DateTimeField()

After that, it all just worked. The gap between having it all working in the Admin interface (time taken: 3 hours) and having it all working with production views was much larger, though. The Admin interface is full of beautiful widgets that are not at all re-usable in your production site.

The full code’s available over at github (under AGPLv3). I’d be very happy to get patches to make it smarter, and let me know if you find any bugs. Thanks!

Random Posts

  • 使用 sshfs 将全世界的主机挂载到你的电脑上
  • Eee PC 安裝 Ubuntu Remix
  • 5 Most Depressed Comics Characters
  • Secrets of iPhone 2, MacBook Touch and Air.
  • 10 Practical Tips To Keep Your Cellphone From Killing You
  • Opera 9.5 Still in the Browser Race [Screenshot Tour]
  • Pronounce Tells You How to Say It [Featured Firefox Extension]
  • 25 Ways To Tell You’re Grown Up
  • What’s Coming in Internet Explorer 8 for IT Professionals?
  • 7 Habits Essential for Tackling the Multitasking Virus

推荐日志

该文章发表于Monday, September 29th, 2008 at 4:58 am 分类: 推荐日志. 您可以使用 RSS 2.0 订阅本文的全部回复. 您可以到文章后面发表评论,通告功能目前被关闭.

Leave a Reply

« 19 Really Cool Gadgets for Your Office or Cubicle
原来还是外国白求恩帮的忙 »
  • Development Log

    • Moxida欢迎您来到这里!
      本站部分内容来自网络,版权归原作者所有。这些文章都是我收集来做网摘用的,如果涉及侵权请留言告知,本站会立即删除!
  • 分页导航»

    • About
    • Archives
    • Tags
  • 日志分类»

    • 默认类别
    • 生活点滴
    • 扯谈分享
    • 推荐日志
  • 书签盒子»

    • baidu
    • Moxida Home
  • My AD»

  • 友情链接»

    • Documentation
    • Support Forum
    • Plugins
    • Themes
    • WordPress Planet

图片展示»

    the new muxtape - an embedded widgetGoogle's new start page in the chrome browserA New VersionShinshu, Nagano JapanShinshu, Nagano JapanShinshu, Nagano Japan

站点统计»

    文章数:7596
    页面数:3
    分类数:4
    标签数:12
    链接数:7
    评论数:21
    总字数:5717398
    建站日期:2008.3.10
    最后更新:2008年10月4日
  • © 2007 Moxida网摘 | 主站 Moxida 2.0 All rights reserved
    Powered by WordPress | XHTML CSS | 32 Queries. 6.414 seconds.
    Web Site Mirror Select
    移动 | 联通 | 网通 | 电信