vagrant-rekey-ssh 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDE5ZjkxNGUyYTQzMDk5OGZlZjllYTgxZWEyMmFkNmQ5ZGYyMzQwZA==
4
+ MzAyMmIyZTFiOWMwZGJiYWJlNDMzMTRmMGM1NTJiYzEwODNjODA0Yg==
5
5
  data.tar.gz: !binary |-
6
- MWYzNjUwZTQ4MTI5MThmNjVkOWIzZGIzNmJlN2I3NjBkY2FhZTVjNQ==
6
+ YzgwZTgyN2QwMDNiZjhkNmVhNTYxYWQ3ZjRiZTQ4MDAzZjEzNDQzZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzE1NzEzNTdhZmZkMmM2ZGUyZDAxZTI0MWEwNWJiN2VkNjcxNDM4OWMwYzVm
10
- MjZiOGZjM2NlNDEyYWEzZDdkZjA4ODg0YzhiZDAwYmRiZjJlMWFiMDU2NGFm
11
- NjY1MGVkZTUyMzgzMDA3N2UxOTQ4NzhhMWZiM2MwOGE1Mjc4Yzg=
9
+ NmM2OTE2MjEyNmYwYmY5NTI4MTMxMmFjODY2ZGJmMGY1NWNmMmZmYTU3YTYx
10
+ ZTU2NDAwNjA3YTE4NDFkYTc0NjM0ZDBiY2JhMDNmYTE5NGRjMGI4MWIzMGQz
11
+ MDEyNzJkNGM5ZTJkNWM4NWQxNzBiYjA5NTYzZDUxYjlhODEwOTk=
12
12
  data.tar.gz: !binary |-
13
- MjI0MzgxZjEyMDkwYzQ3OGVmNjcxODE2NzA4OGUxZTRjZWQwZTFiM2IxNWQw
14
- NWJjMWI5NGYxMGFiN2JjNWJjZGQ1Yzk2NjlkOWE3YjI1M2Q5NjhiNTA4MDcx
15
- ZWE4OGFmMzY0NWEzMzYzNWViOGZhYTlmZTIyNGEwMzk1MmE1YjQ=
13
+ MDM2OWNmOThiMDI0NTViNmU2MmU1ZTQyNDkyMjg3NjBiMDk5ZjZkMjFmMmVh
14
+ NTM0ZjdlZTVmMzg4NmZiMjJlMDMwZjk5ODYyNTA1MThjOWNmODNlYjU1OTFk
15
+ NTllMDUzZmU1M2EzMWZkZjA3MjNjYmM3M2IwMzRkMjRlNTUzMDg=
data/README.md CHANGED
@@ -69,15 +69,13 @@ Compatibility
69
69
  -------------
70
70
 
71
71
  I've only tested this on Vagrant 1.3.5 using the Virtualbox provider on Ubuntu
72
- and OSX. Let me know if it works on earlier versions of Vagrant, and I'll put
73
- that here.
72
+ and OSX. In addition, it was tested on Windows 8.1 with Vagrant 1.6.3 and the
73
+ VirtualBox provider. Let me know if it works on earlier versions of Vagrant,
74
+ and I'll put that here.
74
75
 
75
76
  Known Issues
76
77
  ------------
77
78
 
78
- This isn't going to work on a Vagrant VM that is running a non-unix operating
79
- system.
80
-
81
79
  I haven't figured out a generic way to override a machine's configuration
82
80
  without hooking specific actions, which results in the following bugs that
83
81
  I am aware of:
@@ -1,4 +1,6 @@
1
1
 
2
+ require 'sshkey'
3
+
2
4
  module VagrantPlugins
3
5
  module RekeySSH
4
6
  module Helpers
@@ -8,10 +10,12 @@ module VagrantPlugins
8
10
 
9
11
  @machine.ui.info(I18n.t("vagrant_rekey_ssh.info.generating_key"))
10
12
 
11
- result = Vagrant::Util::Subprocess.execute("ssh-keygen", "-f", ssh_key_path, "-N", "")
12
-
13
- if result.exit_code != 0
14
- raise Errors::ErrorCreatingSshKey, exit_code: result.exit_code
13
+ key = SSHKey.generate(:comment => "vagrant less insecure private key")
14
+ begin
15
+ File.write(ssh_key_path, key.private_key)
16
+ File.write(ssh_pubkey_path, key.ssh_public_key)
17
+ rescue => exc
18
+ raise Errors::ErrorCreatingSshKey, error_message: exc.message
15
19
  end
16
20
 
17
21
  @machine.ui.info(I18n.t("vagrant_rekey_ssh.info.key_generated", :path => ssh_key_path))
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module RekeySSH
3
- VERSION = "0.1.7"
3
+ VERSION = "0.1.8"
4
4
  end
5
5
  end
data/locales/en.yml CHANGED
@@ -17,6 +17,6 @@ en:
17
17
 
18
18
  errors:
19
19
  creating_ssh_key: |-
20
- Error occurred when creating the ssh key (ssh-keygen returned %{exit_code})
20
+ Error occurred when creating the ssh key (%{error_message})
21
21
  invalid_generated_ssh_key: |-
22
22
  Generated SSH key was not in an expected format! Perhaps it was corrupted?
@@ -20,4 +20,5 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.3"
22
22
  spec.add_development_dependency "rake"
23
+ spec.add_runtime_dependency "sshkey"
23
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-rekey-ssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Spicuzza
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-09 00:00:00.000000000 Z
11
+ date: 2014-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: sshkey
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  description: Automatically secure vagrant boxes with a randomly generated SSH key
42
56
  email:
43
57
  - dustin@virtualroadside.com