All future Net-SSH gem releases will now be signed (as of 2.6.5)
**Updated (2013-02-06@13:00PST): Doh. Some previously updated gems were broken. See below. **
In response to the recent vulnerabilities with rubygems.org, I spent the morning signing and re-releasing the Net-SSH family of ruby gems. The discussion on how to properly handle code signing is still ongoing so this could be just an interrim measure; however, the severity of the problem makes it necessary to have a solution in place now.
Current Signed Releases
As of today, all net-ssh releases will be signed and verifiable with the public certificate at the end of this post.
- net-ssh 2.6.5+ (rubygems, github)
- net-scp 1.1.0+ (rubygems, github)
- net-sftp 2.2.0 (rubygems, github)
- net-ssh-gateway 1.2.0 (rubygems, github)
- net-ssh-multi 1.2.0 (rubygems, github)
Installation
You can still gem install net-ssh
like you do already but if you want to verify the gem is authentic, you will now be able to run:
$ gem install net-ssh -P HighSecurity
To do this, you need to add the public certificate to local trust gem certs (otherwise you’ll see an error like "Couldn't verify data signature"
):
$ curl -O https://raw.github.com/net-ssh/net-ssh/master/gem-public_cert.pem
$ gem cert --add gem-public_cert.pem
Broken versions
The following gems were broken:
- net-ssh-gateway-1.1.1
- net-ssh-gateway-1.1.2
- net-ssh-multi-1.1.1
- net-ssh-multi-1.1.2
- net-scp-1.0.5
- net-scp-1.0.6
They’ve been yanked from rubygems.org but if already have them on your system, you will need to remove them manually.
$ gem uninstall -v 1.1.1 net-ssh-multi
$ gem uninstall -v 1.1.2 net-ssh-multi
$ gem uninstall -v 1.1.1 net-ssh-gateway
$ gem uninstall -v 1.1.2 net-ssh-gateway
$ gem uninstall -v 1.0.5 net-scp
$ gem uninstall -v 1.0.6 net-scp
If you have any trouble let me know at net-ssh@solutious.com.
Public certificate
-----BEGIN CERTIFICATE-----
MIIDNjCCAh6gAwIBAgIBADANBgkqhkiG9w0BAQUFADBBMQ8wDQYDVQQDDAZkZWxh
bm8xGTAXBgoJkiaJk/IsZAEZFglzb2x1dGlvdXMxEzARBgoJkiaJk/IsZAEZFgNj
b20wHhcNMTMwMjA2MTE1NzQ1WhcNMTQwMjA2MTE1NzQ1WjBBMQ8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