net-ssh 6.0.2 → 6.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 64788ad9e1631653585c4f6c15ba5f9f75f3c7094c7514e846b2903033ab63b7
4
- data.tar.gz: abe406f28126935bcae76b9d83318164da56128482541cf60807628a91470481
3
+ metadata.gz: 3871354412d3c8b53ef8bf56fccfc9b0bbbe76c7f1792005edeca4c90546f80f
4
+ data.tar.gz: 5d9c55ae9e77f57df83cdd68d3a707ea5583c05fa3ddfa718435b4706bc7da92
5
5
  SHA512:
6
- metadata.gz: '092f1301f068486c0db17fb8b58ba1d9453298c083a0b76fa5eae8c9863b5b6270dd7d805642a00e63d87ccb11220f7b1fe5acdbbbf6b46fe6f4e3c45aea7727'
7
- data.tar.gz: bb3a8b5ffc952940dce240422f5354dced264b25cb84a0072e44b7068cc1d05da1f14e19a290b0f956bde35f6560021cddf67485bbb242bb6c9f701220287325
6
+ metadata.gz: 54f879420d7c34c5e190050506ab61ef5b7d0aae70cf417ff40ea78ed5cd7d595f7354b81bf9b6961b44b071df121612bdc153e141c77f1a4dc17d0c69946360
7
+ data.tar.gz: 5c98a21d3ca109e0fb406bba5a6e453732f8a87f52bda0f9233dfdf7af3eed4b56bc8eca732a1ff5191e9d7eb620fe80867db805932d062be224373875c8d56b
@@ -1 +1 @@
1
- f�g�$�����-�>O1xR�B��_haX^[E��TJ�N��+��-�}��C̩��9ND�-��Uƻ����]�1��b��1
1
+ kG�E�i#�@QK�����x�����߬K4�r��D���G~��YB�{�ُ��\J���B�͖%q�Q2+[��雼|����]���If��=9-��_�����f���ܜ�*EnۃqYaX��pj4��$
data.tar.gz.sig CHANGED
@@ -1 +1,3 @@
1
- q/q�Ι��2L�%���7\+Es�ٛ5�=v��X���1�G�,v�����%�q,������̊�p]tZ,S7o.O �$ȴldb �4`�^�d}�������|pdl��M.�N}���Ns{��f%���i|���V3�-�+ a�r,��0]�@e'���u���6V�3�Ӻ���}�3���o'�deo7^K6�7�~̽�Qxa+|m��3�hy����Kb�G;��8��q�|<�k��/5��
1
+ 3���f����;��jG}��[7@���G>�콳)��0�q��hO1�Nۙ*u�%�IT��z��w4t����J:w�EZw4vE �'p5�HI<
2
+ ƿ!� Z>E3�s� �����r�(�^y���7nJ+Ay�<0�V� �dEy��#�b�H ?��aQ�CS�ϕb�y�M�c�B~C�f�Kv�-"�{?�Z����W
3
+ �`��!$�M�i]k���m��i��oy���=�=TpV�G����U�� �F���
@@ -1,3 +1,14 @@
1
+ === 6.1.0
2
+
3
+ * adapt to ssh's default bahaviors when no username is provided.
4
+ When Net::SSH.start user is nil and config has no entry
5
+ we default to Etc.getpwuid.name() instead of Etc.getlogin(). [#749]
6
+
7
+ === 6.1.0.rc1
8
+
9
+ * Make sha2-{256,512}-etm@openssh.com MAC default again [#761]
10
+ * Support algorithm subtraction syntax from ssh_config [#751]
11
+
1
12
  === 6.0.2
2
13
 
3
14
  * Fix corrupted hmac issue in etm hmac [#759]
@@ -12,7 +23,7 @@
12
23
  * Add sha2-{256,512}-etm@openssh.com MAC algorithms [graaff, #714]
13
24
 
14
25
  === 6.0.0 beta2
15
-
26
+
16
27
  * Support :certkeys and CertificateFile configuration option [Anders Carling, #722]
17
28
 
18
29
  === 6.0.0 beta1
data/README.md CHANGED
@@ -33,7 +33,7 @@ We strongly recommend that you install a servers's version that supports the lat
33
33
 
34
34
  It is possible to return to the previous behavior by adding the option : `append_all_supported_algorithms: true`
35
35
 
36
- Unsecure algoritms will be definively remove in Net::SSH 7.*.
36
+ Unsecure algoritms will definitely be removed in Net::SSH 7.*.
37
37
 
38
38
  ### Host Keys
39
39
 
@@ -63,7 +63,7 @@ Unsecure algoritms will be definively remove in Net::SSH 7.*.
63
63
 
64
64
  | Name | Support | Details |
65
65
  |--------------------------------------|-----------------------|----------|
66
- | aes256-ctr / aes192-ctr / aes128-ctr | OK | [using weak elliptic curves](https://safecurves.cr.yp.to/) |
66
+ | aes256-ctr / aes192-ctr / aes128-ctr | OK | |
67
67
  | aes256-cbc / aes192-cbc / aes128-cbc | Deprecated in 6.0 | unsecure, will be removed in 7.0 |
68
68
  | rijndael-cbc@lysator.liu.se | Deprecated in 6.0 | unsecure, will be removed in 7.0 |
69
69
  | blowfish-ctr blowfish-cbc | Deprecated in 6.0 | unsecure, will be removed in 7.0 |
@@ -97,6 +97,7 @@ In a nutshell:
97
97
  require 'net/ssh'
98
98
 
99
99
  Net::SSH.start('host', 'user', password: "password") do |ssh|
100
+
100
101
  # capture all stderr and stdout output from a remote process
101
102
  output = ssh.exec!("hostname")
102
103
  puts output
@@ -104,7 +105,7 @@ puts output
104
105
  # capture only stdout matching a particular pattern
105
106
  stdout = ""
106
107
  ssh.exec!("ls -l /home/jamis") do |channel, stream, data|
107
- stdout << data if stream == :stdout
108
+ stdout << data if stream == :stdout && /foo/.match(data)
108
109
  end
109
110
  puts stdout
110
111
 
@@ -164,7 +165,7 @@ gem install net-ssh # might need sudo privileges
164
165
  ```
165
166
 
166
167
  NOTE: If you are running on jruby on windows you need to install `jruby-pageant` manually
167
- (gemspec doesn't allow for platform specific dependencies).
168
+ (gemspec doesn't allow for platform specific dependencies at gem installation time).
168
169
 
169
170
  However, in order to be sure the code you're installing hasn't been tampered with,
170
171
  it's recommended that you verify the [signature](http://docs.rubygems.org/read/chapter/21).
@@ -251,7 +251,7 @@ module Net
251
251
  transport = Transport::Session.new(host, options)
252
252
  auth = Authentication::Session.new(transport, options)
253
253
 
254
- user = options.fetch(:user, user) || Etc.getlogin
254
+ user = options.fetch(:user, user) || Etc.getpwuid.name
255
255
  if auth.authenticate("ssh-connection", user, options[:password])
256
256
  connection = Connection::Session.new(transport, options)
257
257
  if block_given?
@@ -43,7 +43,8 @@ module Net
43
43
 
44
44
  encryption: %w[aes256-ctr aes192-ctr aes128-ctr],
45
45
 
46
- hmac: %w[hmac-sha2-512 hmac-sha2-256
46
+ hmac: %w[hmac-sha2-512-etm@openssh.com hmac-sha2-256-etm@openssh.com
47
+ hmac-sha2-512 hmac-sha2-256
47
48
  hmac-sha1]
48
49
  }.freeze
49
50
 
@@ -83,9 +84,7 @@ module Net
83
84
  hmac-sha1-96
84
85
  hmac-ripemd160 hmac-ripemd160@openssh.com
85
86
  hmac-md5 hmac-md5-96
86
- none] +
87
- %w[hmac-sha2-256-etm@openssh.com
88
- hmac-sha2-512-etm@openssh.com],
87
+ none],
89
88
 
90
89
  compression: %w[none zlib@openssh.com zlib],
91
90
  language: %w[]
@@ -291,10 +290,24 @@ module Net
291
290
  list = []
292
291
  option = Array(option).compact.uniq
293
292
 
294
- if option.first && option.first.start_with?('+')
293
+ if option.first && option.first.start_with?('+', '-')
295
294
  list = supported.dup
296
- list << option.first[1..-1]
297
- list.concat(option[1..-1])
295
+
296
+ appends = option.select { |opt| opt.start_with?('+') }.map { |opt| opt[1..-1] }
297
+ deletions = option.select { |opt| opt.start_with?('-') }.map { |opt| opt[1..-1] }
298
+
299
+ list.concat(appends)
300
+
301
+ deletions.each do |opt|
302
+ if opt.include?('*')
303
+ opt_escaped = Regexp.escape(opt)
304
+ algo_re = /\A#{opt_escaped.gsub('\*', '[A-Za-z\d\-@\.]*')}\z/
305
+ list.delete_if { |existing_opt| algo_re.match(existing_opt) }
306
+ else
307
+ list.delete(opt)
308
+ end
309
+ end
310
+
298
311
  list.uniq!
299
312
  else
300
313
  list = option
@@ -49,10 +49,10 @@ module Net
49
49
  MAJOR = 6
50
50
 
51
51
  # The minor component of this version of the Net::SSH library
52
- MINOR = 0
52
+ MINOR = 1
53
53
 
54
54
  # The tiny component of this version of the Net::SSH library
55
- TINY = 2
55
+ TINY = 0
56
56
 
57
57
  # The prerelease component of this version of the Net::SSH library
58
58
  # nil allowed
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-ssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.2
4
+ version: 6.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck
@@ -31,7 +31,7 @@ cert_chain:
31
31
  voajiJNS75Pw/2j13WnPB4Q6w7dHSb57E/VluBpVKmcQZN0dGdAkEIVty3v7kw9g
32
32
  y++VpCpWM/PstIFv4ApZMf501UY=
33
33
  -----END CERTIFICATE-----
34
- date: 2020-04-25 00:00:00.000000000 Z
34
+ date: 2020-06-09 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bcrypt_pbkdf
metadata.gz.sig CHANGED
Binary file