direct_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
- YWY4NDE5MmNiMzg5NzYzZWMyYzE0ZjhjZmNmMjVlMDQ0YWRlZTc2Yw==
4
+ YjA1OTA3N2M3NjRkNzUwMTUzYjJiYzIzMjM2NWYwMDcwYzA1M2U1Ng==
5
5
  data.tar.gz: !binary |-
6
- NDAxYzkwNzVlYjk3OWNkNGVjY2NhOTg4MzQxNmQzNWI3ZWE5YmFlNQ==
6
+ NGQ1OTk3YjM0MDg4ZjNlYjQyZDdjODM0MWFmYTFjMWJlMzM1ZTUzNQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YzFmZDBhM2VmM2NhMjdlZGU3MTFjMmJmYzMwZjRiNmIxZTViNjQxYTA0MDZl
10
- ZWFmYTBmN2Q4NTQ0ZTU5MTlmNzk3MGM0NzYzZGM5YzA1ZmI2NjIzYTQ0NzVk
11
- ODM3ZGViYjliNzBmMjM3NmJhNWVlZGZjMmUxMjhkNjA1NjUzYTA=
9
+ MGU2YmViMDA3NzhmZWQ1OTVkN2Y2N2U3MTEyOTdlYTEyYzI4ZmZlZjAzYTQ1
10
+ ZDgwNDYzNDZhYzU5MWNkM2Q3MWMzZDVmZTg1YmJlYTAyNzlmZDBhNzNlMzEy
11
+ OWQ5OGRhMmJmNWE4ZjkyMGVjNzI0Njk0YTVkZDQ3NjBkMGNlYmU=
12
12
  data.tar.gz: !binary |-
13
- YjUzMTg3MjQxNzNmN2I1ZGM0YzEyMTNiZWFiOTIxMTQ2YzM1MGY0ODE2ZGE0
14
- OGE2MzllMzZmYTliNTUzZGUyMDFhZTg4MzBhNGIxYmRhZGIwNDZlZWY3MDJh
15
- ZmQ2ZjMxMTA1OTJhNjM4ODBlZjU4MjIwZWIwNDllNTlhODUyMDQ=
13
+ ZDA1MmUyNjExN2M5OTBhZGI0MDJiNzIxNTEyZTllMDQ2OWI0ZDY4NWQ2M2Rm
14
+ ZWZhNGFiY2RhOWZkZWQ2ZjY4Mjk2ZWFiYTBjMTRhZDUwY2RhM2UzZWQ1N2Vk
15
+ NTQ5YjE1MDEyMGFlNjdkZmNjMDk1OTI3MzU1ZjEwZDM2NDNmMjk=
@@ -13,6 +13,7 @@ class Validator
13
13
  end
14
14
 
15
15
  def start(host, user, options={})
16
+ options[:auth_methods] = ["publickey"]
16
17
  return Net::SSH.start(host, user, options)
17
18
  rescue Net::SSH::AuthenticationFailed
18
19
  @direct = false
@@ -21,6 +22,7 @@ class Validator
21
22
  options[:password] = ask("#{user}@#{host}'s password: ") { |q| q.echo = false }
22
23
 
23
24
  begin
25
+ options[:auth_methods] = ["password"]
24
26
  return Net::SSH.start(host, user, options)
25
27
  rescue Net::SSH::AuthenticationFailed
26
28
  end
@@ -1,3 +1,3 @@
1
1
  module DirectSsh
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: direct_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
  - Xia Xiongjun