net-ssh 6.0.0 → 6.2.0.beta1
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.gitignore +2 -0
- data/.rubocop_todo.yml +39 -148
- data/CHANGES.txt +30 -1
- data/README.md +5 -4
- data/lib/net/ssh.rb +1 -1
- data/lib/net/ssh/authentication/certificate.rb +5 -4
- data/lib/net/ssh/authentication/ed25519.rb +1 -1
- data/lib/net/ssh/test/channel.rb +1 -1
- data/lib/net/ssh/test/remote_packet.rb +1 -1
- data/lib/net/ssh/test/script.rb +1 -1
- data/lib/net/ssh/transport/algorithms.rb +20 -4
- data/lib/net/ssh/transport/cipher_factory.rb +3 -3
- data/lib/net/ssh/transport/kex/abstract.rb +9 -2
- data/lib/net/ssh/transport/openssl.rb +13 -4
- data/lib/net/ssh/transport/packet_stream.rb +4 -2
- data/lib/net/ssh/version.rb +2 -2
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e74d12e16e132ebfb6235718a438feb6576d1fe59fd858853458d88d5bb5c6f
|
4
|
+
data.tar.gz: 8f403340fb29215a24790d1115bf891eccc1fc1a754181745cb3bbac19d97d88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e77a53f19272b62fe0fa52d6aea6dc66c68f37b388a79858cb4127a924c616311dc569b18d644bf7aaa96ea7239b0b81836cca4b03621390fd508b7be6540f5a
|
7
|
+
data.tar.gz: 7e1f389d39afbfc159f0f195ae5b8c4232af232123005760b1036e9b5e1b208cab14925f32f60f50396a6865eed603561c70ce80f86d33b2d5a85d24be9845a9
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.gitignore
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2020-05-29 10:37:36 +0200 using RuboCop version 0.74.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 75
|
10
10
|
# Cop supports --auto-correct.
|
11
11
|
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
12
12
|
# SupportedStyles: with_first_argument, with_fixed_indentation
|
13
13
|
Layout/AlignArguments:
|
14
14
|
Enabled: false
|
15
15
|
|
16
|
-
# Offense count:
|
16
|
+
# Offense count: 63
|
17
17
|
# Cop supports --auto-correct.
|
18
18
|
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
19
19
|
# SupportedHashRocketStyles: key, separator, table
|
@@ -32,39 +32,13 @@ Layout/AlignHash:
|
|
32
32
|
Layout/EmptyLineAfterGuardClause:
|
33
33
|
Enabled: false
|
34
34
|
|
35
|
-
# Offense count:
|
35
|
+
# Offense count: 172
|
36
36
|
# Cop supports --auto-correct.
|
37
37
|
# Configuration parameters: EnforcedStyle.
|
38
38
|
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
|
39
39
|
Layout/EmptyLinesAroundModuleBody:
|
40
40
|
Enabled: false
|
41
41
|
|
42
|
-
# Offense count: 2
|
43
|
-
# Cop supports --auto-correct.
|
44
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
45
|
-
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
|
46
|
-
Layout/IndentFirstArrayElement:
|
47
|
-
Exclude:
|
48
|
-
- 'lib/net/ssh/transport/openssl.rb'
|
49
|
-
|
50
|
-
# Offense count: 3
|
51
|
-
# Cop supports --auto-correct.
|
52
|
-
Layout/LeadingBlankLines:
|
53
|
-
Exclude:
|
54
|
-
- 'Rakefile'
|
55
|
-
- 'lib/net/ssh/authentication/pub_key_fingerprint.rb'
|
56
|
-
- 'support/arcfour_check.rb'
|
57
|
-
|
58
|
-
# Offense count: 14
|
59
|
-
# Cop supports --auto-correct.
|
60
|
-
# Configuration parameters: AllowDoxygenCommentStyle.
|
61
|
-
Layout/LeadingCommentSpace:
|
62
|
-
Exclude:
|
63
|
-
- 'test/integration/test_ed25519_pkeys.rb'
|
64
|
-
- 'test/integration/test_forward.rb'
|
65
|
-
- 'test/integration/test_id_rsa_keys.rb'
|
66
|
-
- 'test/integration/test_proxy.rb'
|
67
|
-
|
68
42
|
# Offense count: 23
|
69
43
|
# Cop supports --auto-correct.
|
70
44
|
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
@@ -87,7 +61,7 @@ Layout/SpaceAfterColon:
|
|
87
61
|
- 'test/integration/test_ed25519_pkeys.rb'
|
88
62
|
- 'test/verifiers/test_always.rb'
|
89
63
|
|
90
|
-
# Offense count:
|
64
|
+
# Offense count: 291
|
91
65
|
# Cop supports --auto-correct.
|
92
66
|
Layout/SpaceAfterComma:
|
93
67
|
Enabled: false
|
@@ -99,7 +73,7 @@ Layout/SpaceAfterComma:
|
|
99
73
|
Layout/SpaceAroundEqualsInParameterDefault:
|
100
74
|
Enabled: false
|
101
75
|
|
102
|
-
# Offense count:
|
76
|
+
# Offense count: 12
|
103
77
|
# Cop supports --auto-correct.
|
104
78
|
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
105
79
|
# SupportedStyles: space, no_space
|
@@ -122,14 +96,7 @@ Layout/SpaceInsideReferenceBrackets:
|
|
122
96
|
Exclude:
|
123
97
|
- 'lib/net/ssh/transport/algorithms.rb'
|
124
98
|
|
125
|
-
# Offense count:
|
126
|
-
# Cop supports --auto-correct.
|
127
|
-
# Configuration parameters: EnforcedStyle.
|
128
|
-
# SupportedStyles: final_newline, final_blank_line
|
129
|
-
Layout/TrailingBlankLines:
|
130
|
-
Enabled: false
|
131
|
-
|
132
|
-
# Offense count: 739
|
99
|
+
# Offense count: 730
|
133
100
|
# Cop supports --auto-correct.
|
134
101
|
# Configuration parameters: AllowInHeredoc.
|
135
102
|
Layout/TrailingWhitespace:
|
@@ -177,14 +144,6 @@ Lint/Loop:
|
|
177
144
|
- 'lib/net/ssh/authentication/methods/password.rb'
|
178
145
|
- 'lib/net/ssh/key_factory.rb'
|
179
146
|
|
180
|
-
# Offense count: 3
|
181
|
-
# Configuration parameters: MaximumRangeSize.
|
182
|
-
Lint/MissingCopEnableDirective:
|
183
|
-
Exclude:
|
184
|
-
- 'test/authentication/test_agent.rb'
|
185
|
-
- 'test/authentication/test_certificate.rb'
|
186
|
-
- 'test/integration/test_agent.rb'
|
187
|
-
|
188
147
|
# Offense count: 1
|
189
148
|
Lint/NonLocalExitFromIterator:
|
190
149
|
Exclude:
|
@@ -207,12 +166,6 @@ Lint/UnderscorePrefixedVariableName:
|
|
207
166
|
Exclude:
|
208
167
|
- 'lib/net/ssh/test/local_packet.rb'
|
209
168
|
|
210
|
-
# Offense count: 1
|
211
|
-
# Cop supports --auto-correct.
|
212
|
-
Lint/UnneededRequireStatement:
|
213
|
-
Exclude:
|
214
|
-
- 'lib/net/ssh/ruby_compat.rb'
|
215
|
-
|
216
169
|
# Offense count: 60
|
217
170
|
# Cop supports --auto-correct.
|
218
171
|
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
@@ -229,7 +182,7 @@ Lint/UnusedBlockArgument:
|
|
229
182
|
- 'test/transport/test_algorithms.rb'
|
230
183
|
- 'test/transport/test_hmac.rb'
|
231
184
|
|
232
|
-
# Offense count:
|
185
|
+
# Offense count: 65
|
233
186
|
# Cop supports --auto-correct.
|
234
187
|
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
|
235
188
|
Lint/UnusedMethodArgument:
|
@@ -251,11 +204,11 @@ Lint/UselessAssignment:
|
|
251
204
|
- 'test/integration/common.rb'
|
252
205
|
- 'test/integration/test_forward.rb'
|
253
206
|
|
254
|
-
# Offense count:
|
207
|
+
# Offense count: 239
|
255
208
|
Metrics/AbcSize:
|
256
|
-
Max:
|
209
|
+
Max: 71
|
257
210
|
|
258
|
-
# Offense count:
|
211
|
+
# Offense count: 17
|
259
212
|
# Configuration parameters: CountComments, ExcludedMethods.
|
260
213
|
# ExcludedMethods: refine
|
261
214
|
Metrics/BlockLength:
|
@@ -266,23 +219,21 @@ Metrics/BlockLength:
|
|
266
219
|
Metrics/BlockNesting:
|
267
220
|
Max: 4
|
268
221
|
|
269
|
-
# Offense count:
|
222
|
+
# Offense count: 33
|
270
223
|
# Configuration parameters: CountComments.
|
271
224
|
Metrics/ClassLength:
|
272
225
|
Max: 488
|
273
226
|
|
274
|
-
# Offense count:
|
227
|
+
# Offense count: 40
|
275
228
|
Metrics/CyclomaticComplexity:
|
276
|
-
Max:
|
277
|
-
Exclude:
|
278
|
-
- 'lib/net/ssh/config.rb'
|
229
|
+
Max: 28
|
279
230
|
|
280
|
-
# Offense count:
|
231
|
+
# Offense count: 224
|
281
232
|
# Configuration parameters: CountComments, ExcludedMethods.
|
282
233
|
Metrics/MethodLength:
|
283
|
-
Max:
|
234
|
+
Max: 72
|
284
235
|
|
285
|
-
# Offense count:
|
236
|
+
# Offense count: 3
|
286
237
|
# Configuration parameters: CountComments.
|
287
238
|
Metrics/ModuleLength:
|
288
239
|
Max: 160
|
@@ -292,11 +243,11 @@ Metrics/ModuleLength:
|
|
292
243
|
Metrics/ParameterLists:
|
293
244
|
Max: 6
|
294
245
|
|
295
|
-
# Offense count:
|
246
|
+
# Offense count: 32
|
296
247
|
Metrics/PerceivedComplexity:
|
297
248
|
Max: 20
|
298
249
|
|
299
|
-
# Offense count:
|
250
|
+
# Offense count: 10
|
300
251
|
Naming/AccessorMethodName:
|
301
252
|
Exclude:
|
302
253
|
- 'lib/net/ssh/authentication/methods/password.rb'
|
@@ -313,25 +264,9 @@ Naming/BinaryOperatorParameterName:
|
|
313
264
|
- 'lib/net/ssh/buffer.rb'
|
314
265
|
- 'lib/net/ssh/version.rb'
|
315
266
|
|
316
|
-
# Offense count:
|
267
|
+
# Offense count: 16
|
317
268
|
Naming/ClassAndModuleCamelCase:
|
318
|
-
|
319
|
-
- 'lib/net/ssh/transport/hmac/md5_96.rb'
|
320
|
-
- 'lib/net/ssh/transport/hmac/sha1_96.rb'
|
321
|
-
- 'lib/net/ssh/transport/hmac/sha2_256.rb'
|
322
|
-
- 'lib/net/ssh/transport/hmac/sha2_256_96.rb'
|
323
|
-
- 'lib/net/ssh/transport/hmac/sha2_256_etm.rb'
|
324
|
-
- 'lib/net/ssh/transport/hmac/sha2_512.rb'
|
325
|
-
- 'lib/net/ssh/transport/hmac/sha2_512_96.rb'
|
326
|
-
- 'lib/net/ssh/transport/hmac/sha2_512_etm.rb'
|
327
|
-
- 'test/transport/hmac/test_md5_96.rb'
|
328
|
-
- 'test/transport/hmac/test_sha1_96.rb'
|
329
|
-
- 'test/transport/hmac/test_sha2_256.rb'
|
330
|
-
- 'test/transport/hmac/test_sha2_256_96.rb'
|
331
|
-
- 'test/transport/hmac/test_sha2_256_etm.rb'
|
332
|
-
- 'test/transport/hmac/test_sha2_512.rb'
|
333
|
-
- 'test/transport/hmac/test_sha2_512_96.rb'
|
334
|
-
- 'test/transport/hmac/test_sha2_512_etm.rb'
|
269
|
+
Enabled: false
|
335
270
|
|
336
271
|
# Offense count: 4
|
337
272
|
Naming/ConstantName:
|
@@ -340,7 +275,7 @@ Naming/ConstantName:
|
|
340
275
|
- 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
|
341
276
|
- 'lib/net/ssh/transport/openssl.rb'
|
342
277
|
|
343
|
-
# Offense count:
|
278
|
+
# Offense count: 12
|
344
279
|
# Configuration parameters: Blacklist.
|
345
280
|
# Blacklist: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
|
346
281
|
Naming/HeredocDelimiterNaming:
|
@@ -352,7 +287,7 @@ Naming/HeredocDelimiterNaming:
|
|
352
287
|
- 'test/integration/test_agent.rb'
|
353
288
|
- 'test/test_key_factory.rb'
|
354
289
|
|
355
|
-
# Offense count:
|
290
|
+
# Offense count: 5
|
356
291
|
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
|
357
292
|
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
|
358
293
|
Naming/MemoizedInstanceVariableName:
|
@@ -394,7 +329,6 @@ Naming/UncommunicativeMethodParamName:
|
|
394
329
|
- 'lib/net/ssh/authentication/pageant.rb'
|
395
330
|
- 'lib/net/ssh/buffer.rb'
|
396
331
|
- 'lib/net/ssh/buffered_io.rb'
|
397
|
-
- 'lib/net/ssh/ruby_compat.rb'
|
398
332
|
- 'lib/net/ssh/test/socket.rb'
|
399
333
|
- 'lib/net/ssh/transport/ctr.rb'
|
400
334
|
- 'lib/net/ssh/transport/hmac/abstract.rb'
|
@@ -446,7 +380,7 @@ Style/AsciiComments:
|
|
446
380
|
- 'lib/net/ssh/authentication/pageant.rb'
|
447
381
|
- 'lib/net/ssh/buffered_io.rb'
|
448
382
|
|
449
|
-
# Offense count:
|
383
|
+
# Offense count: 9
|
450
384
|
# Cop supports --auto-correct.
|
451
385
|
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners.
|
452
386
|
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
@@ -487,29 +421,12 @@ Style/CharacterLiteral:
|
|
487
421
|
Exclude:
|
488
422
|
- 'test/test_buffer.rb'
|
489
423
|
|
490
|
-
# Offense count:
|
424
|
+
# Offense count: 17
|
491
425
|
# Cop supports --auto-correct.
|
492
426
|
# Configuration parameters: AutoCorrect, EnforcedStyle.
|
493
427
|
# SupportedStyles: nested, compact
|
494
428
|
Style/ClassAndModuleChildren:
|
495
|
-
|
496
|
-
- 'lib/net/ssh/transport/ctr.rb'
|
497
|
-
- 'lib/net/ssh/transport/hmac.rb'
|
498
|
-
- 'lib/net/ssh/transport/hmac/md5.rb'
|
499
|
-
- 'lib/net/ssh/transport/hmac/md5_96.rb'
|
500
|
-
- 'lib/net/ssh/transport/hmac/none.rb'
|
501
|
-
- 'lib/net/ssh/transport/hmac/ripemd160.rb'
|
502
|
-
- 'lib/net/ssh/transport/hmac/sha1.rb'
|
503
|
-
- 'lib/net/ssh/transport/hmac/sha1_96.rb'
|
504
|
-
- 'lib/net/ssh/transport/hmac/sha2_256.rb'
|
505
|
-
- 'lib/net/ssh/transport/hmac/sha2_256_96.rb'
|
506
|
-
- 'lib/net/ssh/transport/hmac/sha2_256_etm.rb'
|
507
|
-
- 'lib/net/ssh/transport/hmac/sha2_512.rb'
|
508
|
-
- 'lib/net/ssh/transport/hmac/sha2_512_96.rb'
|
509
|
-
- 'lib/net/ssh/transport/hmac/sha2_512_etm.rb'
|
510
|
-
- 'lib/net/ssh/transport/kex.rb'
|
511
|
-
- 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb'
|
512
|
-
- 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb'
|
429
|
+
Enabled: false
|
513
430
|
|
514
431
|
# Offense count: 7
|
515
432
|
Style/ClassVars:
|
@@ -554,13 +471,7 @@ Style/ConditionalAssignment:
|
|
554
471
|
- 'lib/net/ssh/transport/state.rb'
|
555
472
|
- 'test/test_key_factory.rb'
|
556
473
|
|
557
|
-
# Offense count:
|
558
|
-
# Cop supports --auto-correct.
|
559
|
-
Style/DefWithParentheses:
|
560
|
-
Exclude:
|
561
|
-
- 'test/integration/test_forward.rb'
|
562
|
-
|
563
|
-
# Offense count: 14
|
474
|
+
# Offense count: 13
|
564
475
|
Style/Documentation:
|
565
476
|
Exclude:
|
566
477
|
- 'spec/**/*'
|
@@ -568,7 +479,6 @@ Style/Documentation:
|
|
568
479
|
- 'lib/net/ssh/authentication/ed25519.rb'
|
569
480
|
- 'lib/net/ssh/connection/keepalive.rb'
|
570
481
|
- 'lib/net/ssh/connection/session.rb'
|
571
|
-
- 'lib/net/ssh/ruby_compat.rb'
|
572
482
|
- 'lib/net/ssh/test/extensions.rb'
|
573
483
|
- 'lib/net/ssh/transport/kex.rb'
|
574
484
|
- 'lib/net/ssh/transport/key_expander.rb'
|
@@ -602,14 +512,14 @@ Style/FormatStringToken:
|
|
602
512
|
Exclude:
|
603
513
|
- 'lib/net/ssh/loggable.rb'
|
604
514
|
|
605
|
-
# Offense count:
|
515
|
+
# Offense count: 171
|
606
516
|
# Cop supports --auto-correct.
|
607
517
|
# Configuration parameters: EnforcedStyle.
|
608
518
|
# SupportedStyles: always, never
|
609
519
|
Style/FrozenStringLiteralComment:
|
610
520
|
Enabled: false
|
611
521
|
|
612
|
-
# Offense count:
|
522
|
+
# Offense count: 35
|
613
523
|
# Configuration parameters: MinBodyLength.
|
614
524
|
Style/GuardClause:
|
615
525
|
Enabled: false
|
@@ -620,7 +530,7 @@ Style/IfInsideElse:
|
|
620
530
|
Exclude:
|
621
531
|
- 'lib/net/ssh/connection/session.rb'
|
622
532
|
|
623
|
-
# Offense count:
|
533
|
+
# Offense count: 13
|
624
534
|
# Cop supports --auto-correct.
|
625
535
|
Style/IfUnlessModifier:
|
626
536
|
Exclude:
|
@@ -629,8 +539,6 @@ Style/IfUnlessModifier:
|
|
629
539
|
- 'lib/net/ssh/proxy/command.rb'
|
630
540
|
- 'lib/net/ssh/service/forward.rb'
|
631
541
|
- 'lib/net/ssh/transport/ctr.rb'
|
632
|
-
- 'lib/net/ssh/transport/kex.rb'
|
633
|
-
- 'lib/net/ssh/transport/kex/abstract5656.rb'
|
634
542
|
- 'lib/net/ssh/transport/key_expander.rb'
|
635
543
|
- 'test/integration/test_proxy.rb'
|
636
544
|
- 'test/test_key_factory.rb'
|
@@ -690,7 +598,7 @@ Style/MultipleComparison:
|
|
690
598
|
Style/MutableConstant:
|
691
599
|
Enabled: false
|
692
600
|
|
693
|
-
# Offense count:
|
601
|
+
# Offense count: 14
|
694
602
|
# Cop supports --auto-correct.
|
695
603
|
# Configuration parameters: EnforcedStyle.
|
696
604
|
# SupportedStyles: both, prefix, postfix
|
@@ -734,7 +642,7 @@ Style/Not:
|
|
734
642
|
Exclude:
|
735
643
|
- 'lib/net/ssh/connection/channel.rb'
|
736
644
|
|
737
|
-
# Offense count:
|
645
|
+
# Offense count: 10
|
738
646
|
# Cop supports --auto-correct.
|
739
647
|
# Configuration parameters: Strict.
|
740
648
|
Style/NumericLiterals:
|
@@ -771,7 +679,7 @@ Style/ParenthesesAroundCondition:
|
|
771
679
|
- 'lib/net/ssh/transport/ctr.rb'
|
772
680
|
- 'test/integration/test_proxy.rb'
|
773
681
|
|
774
|
-
# Offense count:
|
682
|
+
# Offense count: 23
|
775
683
|
# Cop supports --auto-correct.
|
776
684
|
# Configuration parameters: PreferredDelimiters.
|
777
685
|
Style/PercentLiteralDelimiters:
|
@@ -819,19 +727,13 @@ Style/RedundantBegin:
|
|
819
727
|
- 'lib/net/ssh/verifiers/accept_new.rb'
|
820
728
|
- 'test/manual/test_pageant.rb'
|
821
729
|
|
822
|
-
# Offense count:
|
823
|
-
# Cop supports --auto-correct.
|
824
|
-
Style/RedundantParentheses:
|
825
|
-
Exclude:
|
826
|
-
- 'support/arcfour_check.rb'
|
827
|
-
|
828
|
-
# Offense count: 59
|
730
|
+
# Offense count: 61
|
829
731
|
# Cop supports --auto-correct.
|
830
732
|
# Configuration parameters: AllowMultipleReturnValues.
|
831
733
|
Style/RedundantReturn:
|
832
734
|
Enabled: false
|
833
735
|
|
834
|
-
# Offense count:
|
736
|
+
# Offense count: 18
|
835
737
|
# Cop supports --auto-correct.
|
836
738
|
Style/RedundantSelf:
|
837
739
|
Exclude:
|
@@ -910,14 +812,14 @@ Style/SpecialGlobalVars:
|
|
910
812
|
- 'test/manual/test_pageant.rb'
|
911
813
|
- 'test/test_all.rb'
|
912
814
|
|
913
|
-
# Offense count:
|
815
|
+
# Offense count: 1801
|
914
816
|
# Cop supports --auto-correct.
|
915
817
|
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
916
818
|
# SupportedStyles: single_quotes, double_quotes
|
917
819
|
Style/StringLiterals:
|
918
820
|
Enabled: false
|
919
821
|
|
920
|
-
# Offense count:
|
822
|
+
# Offense count: 7
|
921
823
|
# Cop supports --auto-correct.
|
922
824
|
# Configuration parameters: IgnoredMethods.
|
923
825
|
# IgnoredMethods: respond_to, define_method
|
@@ -928,8 +830,6 @@ Style/SymbolProc:
|
|
928
830
|
- 'lib/net/ssh/connection/session.rb'
|
929
831
|
- 'lib/net/ssh/test/extensions.rb'
|
930
832
|
- 'lib/net/ssh/transport/algorithms.rb'
|
931
|
-
- 'test/integration/test_forward.rb'
|
932
|
-
- 'test/test/test_test.rb'
|
933
833
|
|
934
834
|
# Offense count: 1
|
935
835
|
# Cop supports --auto-correct.
|
@@ -937,20 +837,18 @@ Style/UnneededCondition:
|
|
937
837
|
Exclude:
|
938
838
|
- 'lib/net/ssh/proxy/command.rb'
|
939
839
|
|
940
|
-
# Offense count:
|
840
|
+
# Offense count: 2
|
941
841
|
# Cop supports --auto-correct.
|
942
842
|
Style/UnneededInterpolation:
|
943
843
|
Exclude:
|
944
844
|
- 'lib/net/ssh/proxy/socks5.rb'
|
945
845
|
- 'lib/net/ssh/transport/session.rb'
|
946
|
-
- 'test/integration/test_forward.rb'
|
947
846
|
|
948
|
-
# Offense count:
|
847
|
+
# Offense count: 2
|
949
848
|
# Cop supports --auto-correct.
|
950
849
|
Style/UnneededPercentQ:
|
951
850
|
Exclude:
|
952
851
|
- 'net-ssh.gemspec'
|
953
|
-
- 'test/test_config.rb'
|
954
852
|
|
955
853
|
# Offense count: 2
|
956
854
|
# Cop supports --auto-correct.
|
@@ -973,10 +871,3 @@ Style/ZeroLengthPredicate:
|
|
973
871
|
Exclude:
|
974
872
|
- 'lib/net/ssh/buffered_io.rb'
|
975
873
|
- 'lib/net/ssh/connection/channel.rb'
|
976
|
-
|
977
|
-
# Offense count: 1636
|
978
|
-
# Cop supports --auto-correct.
|
979
|
-
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
980
|
-
# URISchemes: http, https
|
981
|
-
Metrics/LineLength:
|
982
|
-
Max: 932
|
data/CHANGES.txt
CHANGED
@@ -1,3 +1,32 @@
|
|
1
|
+
=== 6.2.0. beta1
|
2
|
+
|
3
|
+
* rsa-sha2-512, rsa-sha2-256 host_key algs [#771]
|
4
|
+
* JRuby aes*-ctr suppport [#767]
|
5
|
+
|
6
|
+
=== 6.1.0
|
7
|
+
|
8
|
+
* Adapt to ssh's default behaviors when no username is provided.
|
9
|
+
When Net::SSH.start user is nil and config has no entry
|
10
|
+
we default to Etc.getpwuid.name() instead of Etc.getlogin(). [#749]
|
11
|
+
|
12
|
+
=== 6.1.0.rc1
|
13
|
+
|
14
|
+
* Make sha2-{256,512}-etm@openssh.com MAC default again [#761]
|
15
|
+
* Support algorithm subtraction syntax from ssh_config [#751]
|
16
|
+
|
17
|
+
=== 6.0.2
|
18
|
+
|
19
|
+
* Fix corrupted hmac issue in etm hmac [#759]
|
20
|
+
|
21
|
+
=== 6.0.1
|
22
|
+
|
23
|
+
* Make sha2-{256,512}-etm@openssh.com MAC opt-in as they seems to have issues [#757]
|
24
|
+
|
25
|
+
=== 6.0.0
|
26
|
+
|
27
|
+
* Support empty lines and comments in known_hosts [donoghuc, #742]
|
28
|
+
* Add sha2-{256,512}-etm@openssh.com MAC algorithms [graaff, #714]
|
29
|
+
|
1
30
|
=== 6.0.0 beta2
|
2
31
|
|
3
32
|
* Support :certkeys and CertificateFile configuration option [Anders Carling, #722]
|
@@ -35,7 +64,7 @@
|
|
35
64
|
|
36
65
|
=== 5.0.2
|
37
66
|
|
38
|
-
*
|
67
|
+
* Fix ctr for jruby [#612]
|
39
68
|
|
40
69
|
=== 5.0.1
|
41
70
|
|
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
|
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 |
|
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).
|
data/lib/net/ssh.rb
CHANGED
@@ -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.
|
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?
|
@@ -35,8 +35,9 @@ module Net
|
|
35
35
|
cert.valid_before = if RUBY_PLATFORM == "java"
|
36
36
|
# 0x20c49ba5e353f7 = 0x7fffffffffffffff/1000, the largest value possible for JRuby
|
37
37
|
# JRuby Time.at multiplies the arg by 1000, and then stores it in a signed long.
|
38
|
-
#
|
39
|
-
|
38
|
+
# 0x20c49ba2d52500 = 292278993-01-01 00:00:00 +0000
|
39
|
+
# JRuby 9.1 does not accept the year 292278994 because of edge cases (https://github.com/JodaOrg/joda-time/issues/190)
|
40
|
+
Time.at([0x20c49ba2d52500, buffer.read_int64].min)
|
40
41
|
else
|
41
42
|
Time.at(buffer.read_int64)
|
42
43
|
end
|
@@ -69,8 +70,8 @@ module Net
|
|
69
70
|
key.ssh_do_sign(data)
|
70
71
|
end
|
71
72
|
|
72
|
-
def ssh_do_verify(sig, data)
|
73
|
-
key.ssh_do_verify(sig, data)
|
73
|
+
def ssh_do_verify(sig, data, options = {})
|
74
|
+
key.ssh_do_verify(sig, data, options)
|
74
75
|
end
|
75
76
|
|
76
77
|
def to_pem
|
data/lib/net/ssh/test/channel.rb
CHANGED
data/lib/net/ssh/test/script.rb
CHANGED
@@ -33,7 +33,9 @@ module Net
|
|
33
33
|
ecdsa-sha2-nistp256
|
34
34
|
ssh-rsa-cert-v01@openssh.com
|
35
35
|
ssh-rsa-cert-v00@openssh.com
|
36
|
-
ssh-rsa
|
36
|
+
ssh-rsa
|
37
|
+
rsa-sha2-256
|
38
|
+
rsa-sha2-512],
|
37
39
|
|
38
40
|
kex: %w[ecdh-sha2-nistp521
|
39
41
|
ecdh-sha2-nistp384
|
@@ -290,10 +292,24 @@ module Net
|
|
290
292
|
list = []
|
291
293
|
option = Array(option).compact.uniq
|
292
294
|
|
293
|
-
if option.first && option.first.start_with?('+')
|
295
|
+
if option.first && option.first.start_with?('+', '-')
|
294
296
|
list = supported.dup
|
295
|
-
|
296
|
-
|
297
|
+
|
298
|
+
appends = option.select { |opt| opt.start_with?('+') }.map { |opt| opt[1..-1] }
|
299
|
+
deletions = option.select { |opt| opt.start_with?('-') }.map { |opt| opt[1..-1] }
|
300
|
+
|
301
|
+
list.concat(appends)
|
302
|
+
|
303
|
+
deletions.each do |opt|
|
304
|
+
if opt.include?('*')
|
305
|
+
opt_escaped = Regexp.escape(opt)
|
306
|
+
algo_re = /\A#{opt_escaped.gsub('\*', '[A-Za-z\d\-@\.]*')}\z/
|
307
|
+
list.delete_if { |existing_opt| algo_re.match(existing_opt) }
|
308
|
+
else
|
309
|
+
list.delete(opt)
|
310
|
+
end
|
311
|
+
end
|
312
|
+
|
297
313
|
list.uniq!
|
298
314
|
else
|
299
315
|
list = option
|
@@ -22,9 +22,9 @@ module Net
|
|
22
22
|
"3des-ctr" => "des-ede3",
|
23
23
|
"blowfish-ctr" => "bf-ecb",
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
"aes256-ctr" => ::OpenSSL::Cipher.ciphers.include?("aes-256-ctr") ? "aes-256-ctr" : "aes-256-ecb",
|
26
|
+
"aes192-ctr" => ::OpenSSL::Cipher.ciphers.include?("aes-192-ctr") ? "aes-192-ctr" : "aes-192-ecb",
|
27
|
+
"aes128-ctr" => ::OpenSSL::Cipher.ciphers.include?("aes-128-ctr") ? "aes-128-ctr" : "aes-128-ecb",
|
28
28
|
'cast128-ctr' => 'cast5-ecb',
|
29
29
|
|
30
30
|
'none' => 'none'
|
@@ -64,11 +64,16 @@ module Net
|
|
64
64
|
|
65
65
|
private
|
66
66
|
|
67
|
+
def matching?(key_ssh_type, host_key_alg)
|
68
|
+
return true if key_ssh_type == host_key_alg
|
69
|
+
return true if key_ssh_type == 'ssh-rsa' && ['rsa-sha2-512', 'rsa-sha2-256'].include?(host_key_alg)
|
70
|
+
end
|
71
|
+
|
67
72
|
# Verify that the given key is of the expected type, and that it
|
68
73
|
# really is the key for the session's host. Raise Net::SSH::Exception
|
69
74
|
# if it is not.
|
70
75
|
def verify_server_key(key) #:nodoc:
|
71
|
-
|
76
|
+
unless matching?(key.ssh_type, algorithms.host_key)
|
72
77
|
raise Net::SSH::Exception, "host key algorithm mismatch '#{key.ssh_type}' != '#{algorithms.host_key}'"
|
73
78
|
end
|
74
79
|
|
@@ -97,7 +102,9 @@ module Net
|
|
97
102
|
|
98
103
|
hash = digester.digest(response.to_s)
|
99
104
|
|
100
|
-
|
105
|
+
server_key = result[:server_key]
|
106
|
+
server_sig = result[:server_sig]
|
107
|
+
unless connection.host_key_verifier.verify_signature { server_key.ssh_do_verify(server_sig, hash, host_key: algorithms.host_key) }
|
101
108
|
raise Net::SSH::Exception, 'could not verify server signature'
|
102
109
|
end
|
103
110
|
|
@@ -63,8 +63,17 @@ module OpenSSL
|
|
63
63
|
end
|
64
64
|
|
65
65
|
# Verifies the given signature matches the given data.
|
66
|
-
def ssh_do_verify(sig, data)
|
67
|
-
|
66
|
+
def ssh_do_verify(sig, data, options = {})
|
67
|
+
digester =
|
68
|
+
if options[:host_key] == "rsa-sha2-512"
|
69
|
+
OpenSSL::Digest::SHA512.new
|
70
|
+
elsif options[:host_key] == "rsa-sha2-256"
|
71
|
+
OpenSSL::Digest::SHA256.new
|
72
|
+
else
|
73
|
+
OpenSSL::Digest::SHA1.new
|
74
|
+
end
|
75
|
+
|
76
|
+
verify(digester, sig, data)
|
68
77
|
end
|
69
78
|
|
70
79
|
# Returns the signature for the given data.
|
@@ -94,7 +103,7 @@ module OpenSSL
|
|
94
103
|
end
|
95
104
|
|
96
105
|
# Verifies the given signature matches the given data.
|
97
|
-
def ssh_do_verify(sig, data)
|
106
|
+
def ssh_do_verify(sig, data, options = {})
|
98
107
|
sig_r = sig[0,20].unpack("H*")[0].to_i(16)
|
99
108
|
sig_s = sig[20,20].unpack("H*")[0].to_i(16)
|
100
109
|
a1sig = OpenSSL::ASN1::Sequence([
|
@@ -192,7 +201,7 @@ module OpenSSL
|
|
192
201
|
end
|
193
202
|
|
194
203
|
# Verifies the given signature matches the given data.
|
195
|
-
def ssh_do_verify(sig, data)
|
204
|
+
def ssh_do_verify(sig, data, options = {})
|
196
205
|
digest = digester.digest(data)
|
197
206
|
a1sig = nil
|
198
207
|
|
@@ -215,12 +215,13 @@ module Net
|
|
215
215
|
# read, post-processed according to the cipher, hmac, and compression
|
216
216
|
# algorithms specified in the server state object, and returned as a
|
217
217
|
# new Packet object.
|
218
|
+
# rubocop:disable Metrics/AbcSize
|
218
219
|
def poll_next_packet
|
219
220
|
aad_length = server.hmac.etm ? 4 : 0
|
220
221
|
|
221
222
|
if @packet.nil?
|
222
223
|
minimum = server.block_size < 4 ? 4 : server.block_size
|
223
|
-
return nil if available < minimum
|
224
|
+
return nil if available < minimum + aad_length
|
224
225
|
data = read_available(minimum + aad_length)
|
225
226
|
|
226
227
|
# decipher it
|
@@ -260,7 +261,7 @@ module Net
|
|
260
261
|
else
|
261
262
|
server.hmac.digest([server.sequence_number, @packet.content].pack("NA*"))
|
262
263
|
end
|
263
|
-
raise Net::SSH::Exception, "corrupted hmac detected" if real_hmac != my_computed_hmac
|
264
|
+
raise Net::SSH::Exception, "corrupted hmac detected #{server.hmac.class}" if real_hmac != my_computed_hmac
|
264
265
|
|
265
266
|
# try to decompress the payload, in case compression is active
|
266
267
|
payload = server.decompress(payload)
|
@@ -273,6 +274,7 @@ module Net
|
|
273
274
|
return Packet.new(payload)
|
274
275
|
end
|
275
276
|
end
|
277
|
+
# rubocop:enable Metrics/AbcSize
|
276
278
|
|
277
279
|
end
|
278
280
|
end
|
data/lib/net/ssh/version.rb
CHANGED
@@ -49,14 +49,14 @@ module Net
|
|
49
49
|
MAJOR = 6
|
50
50
|
|
51
51
|
# The minor component of this version of the Net::SSH library
|
52
|
-
MINOR =
|
52
|
+
MINOR = 2
|
53
53
|
|
54
54
|
# The tiny component of this version of the Net::SSH library
|
55
55
|
TINY = 0
|
56
56
|
|
57
57
|
# The prerelease component of this version of the Net::SSH library
|
58
58
|
# nil allowed
|
59
|
-
PRE =
|
59
|
+
PRE = "beta1"
|
60
60
|
|
61
61
|
# The current version of the Net::SSH library as a Version instance
|
62
62
|
CURRENT = new(*[MAJOR, MINOR, TINY, PRE].compact)
|
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.
|
4
|
+
version: 6.2.0.beta1
|
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-
|
34
|
+
date: 2020-06-11 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bcrypt_pbkdf
|
@@ -279,9 +279,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
279
279
|
version: '2.3'
|
280
280
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
281
281
|
requirements:
|
282
|
-
- - "
|
282
|
+
- - ">"
|
283
283
|
- !ruby/object:Gem::Version
|
284
|
-
version:
|
284
|
+
version: 1.3.1
|
285
285
|
requirements: []
|
286
286
|
rubygems_version: 3.0.3
|
287
287
|
signing_key:
|
metadata.gz.sig
CHANGED
Binary file
|