smart_proxy_remote_execution_ssh 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da4cc9f46c877bbc7fc4e92db5dc13f140cbf59de86a0709749d67eaeceeaa46
4
- data.tar.gz: f8192bcda0fdd9635a0616bf2668a4eac0376d5e026f07c2652d353f7b06addf
3
+ metadata.gz: 23a2d152196372a661f4788b593868ddeb3aaa408d1b622fbbc41c762cde2c7d
4
+ data.tar.gz: f6081d78eb8016ef1ad8b8a3adf7c8952b994e366fad8bc91abed23c23a75627
5
5
  SHA512:
6
- metadata.gz: eb11312a369159202095cb7a3f5c215c3d83755ebd279f6d8d1eb43e3bb5cbe9c9a8cd81075a2903a4a8cd8c1475b0e823610a6d4c5065d2b489483240f48b5a
7
- data.tar.gz: 57f7e5684a6649be4d02d51f18b4988c4826fb486fe7bb31bfa8a6ffb0b9124182dd3100148fbe3d46d771d687eaf56940d7d6b0ae8ba16ef025cb9c3d3c4056
6
+ metadata.gz: 01f151538512f347c78f63f00f1cdf4ce8a8b05eb37d6737ace35785f824f764d19c20df14fc2bef2b446dd4d4dd77864c4754fab09e52aa28e67552d8cce441
7
+ data.tar.gz: f81529cc8c157c3ac838c8235763ef80f5f1a964ba6457cde1d93bef1c376bfec3eeeaca594a516fd10e33ce7a4594a4f233428488d678954fbf8b6cc9285a1e
data/README.md CHANGED
@@ -37,6 +37,9 @@ Install the dependencies
37
37
 
38
38
  $ bundle
39
39
 
40
+ SSH push jobs and Cockpit sessions require the OpenSSH client commands `ssh` and
41
+ `ssh-keygen`. Password and key passphrase authentication also require `sshpass`.
42
+
40
43
  ## Usage
41
44
 
42
45
  To configure this plugin you can use template from settings.d/remote_execution_ssh.yml.example.
@@ -1,4 +1,3 @@
1
- require 'net/ssh'
2
1
  require 'base64'
3
2
  require 'smart_proxy_dynflow/runner'
4
3
 
@@ -4,7 +4,8 @@ module Proxy::RemoteExecution
4
4
  module Utils
5
5
  class << self
6
6
  def prune_known_hosts!(hostname, port, logger = Logger.new($stdout))
7
- return if Net::SSH::KnownHosts.search_for(hostname).empty?
7
+ known_hosts = File.expand_path('~/.ssh/known_hosts')
8
+ return unless File.file?(known_hosts)
8
9
 
9
10
  target = if port == 22
10
11
  hostname
@@ -12,12 +13,10 @@ module Proxy::RemoteExecution
12
13
  "[#{hostname}]:#{port}"
13
14
  end
14
15
 
15
- Open3.popen3('ssh-keygen', '-R', target) do |_stdin, stdout, _stderr, wait_thr|
16
- wait_thr.join
17
- stdout.read
18
- end
16
+ _stdout, stderr, status = Open3.capture3('ssh-keygen', '-R', target, '-f', known_hosts)
17
+ logger.warn("Could not remove #{target} from known_hosts: #{stderr.strip}") unless status.success?
19
18
  rescue Errno::ENOENT => e
20
- logger.warn("Could not remove #{hostname} from know_hosts: #{e}")
19
+ logger.warn("Could not remove #{target} from known_hosts: #{e}")
21
20
  end
22
21
  end
23
22
  end
@@ -1,7 +1,7 @@
1
1
  module Proxy
2
2
  module RemoteExecution
3
3
  module Ssh
4
- VERSION = '1.0.4'
4
+ VERSION = '1.0.5'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_proxy_remote_execution_ssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
@@ -85,54 +85,34 @@ dependencies:
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: 0.82.0
88
+ version: 1.28.0
89
89
  type: :development
90
90
  prerelease: false
91
91
  version_requirements: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: 0.82.0
95
+ version: 1.28.0
96
96
  - !ruby/object:Gem::Dependency
97
- name: ed25519
97
+ name: json
98
98
  requirement: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - ">="
101
- - !ruby/object:Gem::Version
102
- version: '1.2'
103
- - - "<"
104
101
  - !ruby/object:Gem::Version
105
102
  version: '2.0'
106
- type: :runtime
107
- prerelease: false
108
- version_requirements: !ruby/object:Gem::Requirement
109
- requirements:
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- version: '1.2'
113
- - - "<"
114
- - !ruby/object:Gem::Version
115
- version: '2.0'
116
- - !ruby/object:Gem::Dependency
117
- name: bcrypt_pbkdf
118
- requirement: !ruby/object:Gem::Requirement
119
- requirements:
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- version: '1.0'
123
103
  - - "<"
124
104
  - !ruby/object:Gem::Version
125
- version: '2.0'
105
+ version: '3.0'
126
106
  type: :runtime
127
107
  prerelease: false
128
108
  version_requirements: !ruby/object:Gem::Requirement
129
109
  requirements:
130
110
  - - ">="
131
111
  - !ruby/object:Gem::Version
132
- version: '1.0'
112
+ version: '2.0'
133
113
  - - "<"
134
114
  - !ruby/object:Gem::Version
135
- version: '2.0'
115
+ version: '3.0'
136
116
  - !ruby/object:Gem::Dependency
137
117
  name: smart_proxy_dynflow
138
118
  requirement: !ruby/object:Gem::Requirement
@@ -153,20 +133,6 @@ dependencies:
153
133
  - - "<"
154
134
  - !ruby/object:Gem::Version
155
135
  version: 2.0.0
156
- - !ruby/object:Gem::Dependency
157
- name: net-ssh
158
- requirement: !ruby/object:Gem::Requirement
159
- requirements:
160
- - - "~>"
161
- - !ruby/object:Gem::Version
162
- version: '7.2'
163
- type: :runtime
164
- prerelease: false
165
- version_requirements: !ruby/object:Gem::Requirement
166
- requirements:
167
- - - "~>"
168
- - !ruby/object:Gem::Version
169
- version: '7.2'
170
136
  - !ruby/object:Gem::Dependency
171
137
  name: mqtt
172
138
  requirement: !ruby/object:Gem::Requirement
@@ -233,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
199
  - !ruby/object:Gem::Version
234
200
  version: '0'
235
201
  requirements: []
236
- rubygems_version: 4.0.16
202
+ rubygems_version: 4.0.20
237
203
  specification_version: 4
238
204
  summary: Ssh remote execution provider for Foreman Smart-Proxy
239
205
  test_files: []