Created
March 9, 2012 13:20
-
-
Save kimoto/2006481 to your computer and use it in GitHub Desktop.
ssh-rsaの秘密鍵から公開鍵を生成するスクリプト
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/env ruby | |
| # encoding: utf-8 | |
| # Author: kimoto | |
| require 'openssl' | |
| ssh_rsa_path = File.join(ENV['HOME'], ".ssh/id_rsa") | |
| ssh_rsa = File.read(ssh_rsa_path) | |
| print OpenSSL::PKey::RSA.new(ssh_rsa).public_key.to_s | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment