net-ssh 7.3.6 → 8.1.2

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.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGES.txt +106 -5
  4. data/README.md +71 -57
  5. data/lib/net/ssh/authentication/agent.rb +35 -11
  6. data/lib/net/ssh/authentication/certificate.rb +2 -2
  7. data/lib/net/ssh/authentication/ed25519.rb +137 -44
  8. data/lib/net/ssh/authentication/ed25519_loader.rb +14 -9
  9. data/lib/net/ssh/authentication/key_manager.rb +22 -11
  10. data/lib/net/ssh/authentication/methods/abstract.rb +6 -8
  11. data/lib/net/ssh/authentication/methods/hostbased.rb +3 -3
  12. data/lib/net/ssh/authentication/methods/publickey.rb +52 -38
  13. data/lib/net/ssh/authentication/security_key.rb +71 -0
  14. data/lib/net/ssh/authentication/session.rb +30 -17
  15. data/lib/net/ssh/buffer.rb +8 -3
  16. data/lib/net/ssh/buffered_io.rb +40 -3
  17. data/lib/net/ssh/config.rb +123 -50
  18. data/lib/net/ssh/connection/channel.rb +49 -2
  19. data/lib/net/ssh/connection/session.rb +151 -13
  20. data/lib/net/ssh/errors.rb +34 -6
  21. data/lib/net/ssh/key_factory.rb +7 -1
  22. data/lib/net/ssh/known_hosts.rb +103 -38
  23. data/lib/net/ssh/multiplex/client.rb +162 -0
  24. data/lib/net/ssh/multiplex/control_path.rb +120 -0
  25. data/lib/net/ssh/multiplex/proxy_transport.rb +218 -0
  26. data/lib/net/ssh/multiplex.rb +127 -0
  27. data/lib/net/ssh/prompt.rb +43 -5
  28. data/lib/net/ssh/proxy/https.rb +28 -4
  29. data/lib/net/ssh/proxy/jump.rb +61 -8
  30. data/lib/net/ssh/service/forward.rb +35 -24
  31. data/lib/net/ssh/test.rb +2 -1
  32. data/lib/net/ssh/transport/algorithms.rb +92 -34
  33. data/lib/net/ssh/transport/chacha20_poly1305_cipher.rb +89 -16
  34. data/lib/net/ssh/transport/chacha20_poly1305_cipher_loader.rb +20 -1
  35. data/lib/net/ssh/transport/cipher_factory.rb +23 -1
  36. data/lib/net/ssh/transport/constants.rb +1 -0
  37. data/lib/net/ssh/transport/gcm_cipher.rb +27 -6
  38. data/lib/net/ssh/transport/hmac/sha1_etm.rb +12 -0
  39. data/lib/net/ssh/transport/hmac.rb +2 -0
  40. data/lib/net/ssh/transport/kex/curve25519_sha256.rb +41 -9
  41. data/lib/net/ssh/transport/kex/curve25519_sha256_loader.rb +14 -6
  42. data/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb +8 -0
  43. data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb +45 -15
  44. data/lib/net/ssh/transport/openssl.rb +2 -1
  45. data/lib/net/ssh/transport/packet_stream.rb +12 -0
  46. data/lib/net/ssh/transport/session.rb +61 -45
  47. data/lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb +3 -1
  48. data/lib/net/ssh/verifiers/always.rb +16 -4
  49. data/lib/net/ssh/verifiers/never.rb +2 -1
  50. data/lib/net/ssh/version.rb +3 -3
  51. data/lib/net/ssh.rb +164 -63
  52. data.tar.gz.sig +0 -0
  53. metadata +33 -61
  54. metadata.gz.sig +0 -0
  55. data/.dockerignore +0 -9
  56. data/.github/FUNDING.yml +0 -1
  57. data/.github/config/rubocop_linter_action.yml +0 -4
  58. data/.github/workflows/ci-with-docker.yml +0 -58
  59. data/.github/workflows/ci.yml +0 -99
  60. data/.github/workflows/rubocop.yml +0 -16
  61. data/.gitignore +0 -15
  62. data/.rubocop.yml +0 -22
  63. data/.rubocop_todo.yml +0 -1083
  64. data/DEVELOPMENT.md +0 -23
  65. data/Dockerfile +0 -32
  66. data/Dockerfile.openssl3 +0 -17
  67. data/Dockerfile.zlib_ng +0 -29
  68. data/Gemfile +0 -13
  69. data/Gemfile.noed25519 +0 -12
  70. data/Gemfile.norbnacl +0 -12
  71. data/ISSUE_TEMPLATE.md +0 -30
  72. data/Manifest +0 -132
  73. data/Rakefile +0 -196
  74. data/SECURITY.md +0 -4
  75. data/THANKS.txt +0 -110
  76. data/appveyor.yml +0 -58
  77. data/docker-compose.yml +0 -23
  78. data/net-ssh-public_cert.pem +0 -21
  79. data/net-ssh.gemspec +0 -48
  80. data/support/ssh_tunnel_bug.rb +0 -65
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-ssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.3.6
4
+ version: 8.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck
8
8
  - Delano Mandelbaum
9
9
  - Miklós Fazekas
10
10
  autorequire:
11
- bindir: exe
11
+ bindir: bin
12
12
  cert_chain:
13
13
  - |
14
14
  -----BEGIN CERTIFICATE-----
@@ -32,64 +32,50 @@ cert_chain:
32
32
  ufHf4AX2UIkJbh7zCPkiNCqIr7MSWLNFG/9lOlHYsEJM8XujT1ofPobYx6YSFx/C
33
33
  7HBrI7UX7awt6UvBZebhcHzyMHxg/B5PVQllPA==
34
34
  -----END CERTIFICATE-----
35
- date: 2026-10-05 00:00:00.000000000 Z
35
+ date: 2026-11-08 00:00:00.000000000 Z
36
36
  dependencies:
37
37
  - !ruby/object:Gem::Dependency
38
- name: bcrypt_pbkdf
38
+ name: logger
39
39
  requirement: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - "~>"
42
- - !ruby/object:Gem::Version
43
- version: '1.0'
44
- type: :development
45
- prerelease: false
46
- version_requirements: !ruby/object:Gem::Requirement
47
- requirements:
48
- - - "~>"
49
- - !ruby/object:Gem::Version
50
- version: '1.0'
51
- - !ruby/object:Gem::Dependency
52
- name: ed25519
53
- requirement: !ruby/object:Gem::Requirement
54
- requirements:
55
- - - "~>"
41
+ - - ">="
56
42
  - !ruby/object:Gem::Version
57
- version: '1.2'
58
- type: :development
43
+ version: '0'
44
+ type: :runtime
59
45
  prerelease: false
60
46
  version_requirements: !ruby/object:Gem::Requirement
61
47
  requirements:
62
- - - "~>"
48
+ - - ">="
63
49
  - !ruby/object:Gem::Version
64
- version: '1.2'
50
+ version: '0'
65
51
  - !ruby/object:Gem::Dependency
66
- name: x25519
52
+ name: openssl
67
53
  requirement: !ruby/object:Gem::Requirement
68
54
  requirements:
69
55
  - - ">="
70
56
  - !ruby/object:Gem::Version
71
- version: '0'
72
- type: :development
57
+ version: 3.2.0
58
+ type: :runtime
73
59
  prerelease: false
74
60
  version_requirements: !ruby/object:Gem::Requirement
75
61
  requirements:
76
62
  - - ">="
77
63
  - !ruby/object:Gem::Version
78
- version: '0'
64
+ version: 3.2.0
79
65
  - !ruby/object:Gem::Dependency
80
- name: rbnacl
66
+ name: bcrypt_pbkdf
81
67
  requirement: !ruby/object:Gem::Requirement
82
68
  requirements:
83
69
  - - "~>"
84
70
  - !ruby/object:Gem::Version
85
- version: '7.1'
71
+ version: '1.0'
86
72
  type: :development
87
73
  prerelease: false
88
74
  version_requirements: !ruby/object:Gem::Requirement
89
75
  requirements:
90
76
  - - "~>"
91
77
  - !ruby/object:Gem::Version
92
- version: '7.1'
78
+ version: '1.0'
93
79
  - !ruby/object:Gem::Dependency
94
80
  name: base64
95
81
  requirement: !ruby/object:Gem::Requirement
@@ -136,16 +122,22 @@ dependencies:
136
122
  name: mocha
137
123
  requirement: !ruby/object:Gem::Requirement
138
124
  requirements:
139
- - - "~>"
125
+ - - ">="
140
126
  - !ruby/object:Gem::Version
141
- version: 2.1.0
127
+ version: '2.1'
128
+ - - "<"
129
+ - !ruby/object:Gem::Version
130
+ version: '4'
142
131
  type: :development
143
132
  prerelease: false
144
133
  version_requirements: !ruby/object:Gem::Requirement
145
134
  requirements:
146
- - - "~>"
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: '2.1'
138
+ - - "<"
147
139
  - !ruby/object:Gem::Version
148
- version: 2.1.0
140
+ version: '4'
149
141
  - !ruby/object:Gem::Dependency
150
142
  name: ostruct
151
143
  requirement: !ruby/object:Gem::Requirement
@@ -199,32 +191,9 @@ extra_rdoc_files:
199
191
  - LICENSE.txt
200
192
  - README.md
201
193
  files:
202
- - ".dockerignore"
203
- - ".github/FUNDING.yml"
204
- - ".github/config/rubocop_linter_action.yml"
205
- - ".github/workflows/ci-with-docker.yml"
206
- - ".github/workflows/ci.yml"
207
- - ".github/workflows/rubocop.yml"
208
- - ".gitignore"
209
- - ".rubocop.yml"
210
- - ".rubocop_todo.yml"
211
194
  - CHANGES.txt
212
- - DEVELOPMENT.md
213
- - Dockerfile
214
- - Dockerfile.openssl3
215
- - Dockerfile.zlib_ng
216
- - Gemfile
217
- - Gemfile.noed25519
218
- - Gemfile.norbnacl
219
- - ISSUE_TEMPLATE.md
220
195
  - LICENSE.txt
221
- - Manifest
222
196
  - README.md
223
- - Rakefile
224
- - SECURITY.md
225
- - THANKS.txt
226
- - appveyor.yml
227
- - docker-compose.yml
228
197
  - lib/net/ssh.rb
229
198
  - lib/net/ssh/authentication/agent.rb
230
199
  - lib/net/ssh/authentication/certificate.rb
@@ -240,6 +209,7 @@ files:
240
209
  - lib/net/ssh/authentication/methods/publickey.rb
241
210
  - lib/net/ssh/authentication/pageant.rb
242
211
  - lib/net/ssh/authentication/pub_key_fingerprint.rb
212
+ - lib/net/ssh/authentication/security_key.rb
243
213
  - lib/net/ssh/authentication/session.rb
244
214
  - lib/net/ssh/buffer.rb
245
215
  - lib/net/ssh/buffered_io.rb
@@ -254,6 +224,10 @@ files:
254
224
  - lib/net/ssh/key_factory.rb
255
225
  - lib/net/ssh/known_hosts.rb
256
226
  - lib/net/ssh/loggable.rb
227
+ - lib/net/ssh/multiplex.rb
228
+ - lib/net/ssh/multiplex/client.rb
229
+ - lib/net/ssh/multiplex/control_path.rb
230
+ - lib/net/ssh/multiplex/proxy_transport.rb
257
231
  - lib/net/ssh/packet.rb
258
232
  - lib/net/ssh/prompt.rb
259
233
  - lib/net/ssh/proxy/command.rb
@@ -290,6 +264,7 @@ files:
290
264
  - lib/net/ssh/transport/hmac/ripemd160.rb
291
265
  - lib/net/ssh/transport/hmac/sha1.rb
292
266
  - lib/net/ssh/transport/hmac/sha1_96.rb
267
+ - lib/net/ssh/transport/hmac/sha1_etm.rb
293
268
  - lib/net/ssh/transport/hmac/sha2_256.rb
294
269
  - lib/net/ssh/transport/hmac/sha2_256_96.rb
295
270
  - lib/net/ssh/transport/hmac/sha2_256_etm.rb
@@ -322,9 +297,6 @@ files:
322
297
  - lib/net/ssh/verifiers/always.rb
323
298
  - lib/net/ssh/verifiers/never.rb
324
299
  - lib/net/ssh/version.rb
325
- - net-ssh-public_cert.pem
326
- - net-ssh.gemspec
327
- - support/ssh_tunnel_bug.rb
328
300
  homepage: https://github.com/net-ssh/net-ssh
329
301
  licenses:
330
302
  - MIT
@@ -338,7 +310,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
338
310
  requirements:
339
311
  - - ">="
340
312
  - !ruby/object:Gem::Version
341
- version: '2.6'
313
+ version: '2.7'
342
314
  required_rubygems_version: !ruby/object:Gem::Requirement
343
315
  requirements:
344
316
  - - ">="
metadata.gz.sig CHANGED
Binary file
data/.dockerignore DELETED
@@ -1,9 +0,0 @@
1
- # Remove Git
2
- .git/
3
- .gitignore
4
-
5
- # Vagrant
6
- test/integration/.vagrant
7
-
8
- docker-compose.yml
9
- README.md
data/.github/FUNDING.yml DELETED
@@ -1 +0,0 @@
1
- github: [mfazekas]
@@ -1,4 +0,0 @@
1
- rubocop_fail_level: "convention"
2
-
3
- versions:
4
- rubocop: "1.27.0"
@@ -1,58 +0,0 @@
1
- name: Test
2
- on:
3
- pull_request:
4
- push: { branches: master }
5
-
6
- jobs:
7
- test:
8
- name: Run test suite with docker
9
- runs-on: ubuntu-latest
10
- env:
11
- COMPOSE_FILE: docker-compose.yml
12
-
13
- steps:
14
- - name: Checkout code
15
- uses: actions/checkout@v4
16
-
17
- - name: Build docker images
18
- run: docker compose build
19
-
20
- - name: Run ruby 2.6
21
- run: docker compose run ruby-2.6
22
-
23
- - name: Run ruby 2.7
24
- run: docker compose run ruby-2.7
25
-
26
- - name: Run ruby 3.0
27
- run: docker compose run ruby-3.0
28
-
29
- - name: Run ruby 3.1
30
- run: docker compose run ruby-3.1
31
-
32
- test_openssl3:
33
- name: Run test suite with docker and openssl 3.0
34
- runs-on: ubuntu-latest
35
-
36
- steps:
37
- - name: Checkout code
38
- uses: actions/checkout@v4
39
-
40
- - name: Build docker images
41
- run: docker build -t netssh_openssl3 -f Dockerfile.openssl3 .
42
-
43
- - name: Run ruby 3.0 with openssl3
44
- run: docker run --rm netssh_openssl3
45
-
46
- test_zlib_ng:
47
- name: Run test suite with docker and zlib-ng
48
- runs-on: ubuntu-latest
49
-
50
- steps:
51
- - name: Checkout code
52
- uses: actions/checkout@v4
53
-
54
- - name: Build docker images
55
- run: docker build -t netssh_zlib_ng -f Dockerfile.zlib_ng .
56
-
57
- - name: Run ruby with zlib-ng
58
- run: docker run --rm netssh_zlib_ng
@@ -1,99 +0,0 @@
1
- name: CI
2
- on:
3
- pull_request:
4
- push: { branches: master }
5
- jobs:
6
- test:
7
- runs-on: ubuntu-22.04
8
- strategy:
9
- matrix:
10
- ruby-version: [2.6.10, 2.7.7, 3.0.6, 3.1.3, 3.2.1, 3.3, 3.4]
11
- steps:
12
- - uses: actions/checkout@v3
13
-
14
- - name: Set up Ruby ${{ matrix.ruby-version }}
15
- uses: ruby/setup-ruby@v1
16
- with:
17
- ruby-version: ${{ matrix.ruby-version }}
18
- - name: Set up Python ${{ matrix.python-version }}
19
- uses: actions/setup-python@v2
20
- with:
21
- python-version: 3.8
22
-
23
- - name: Cache bundler
24
- uses: actions/cache@v4
25
- id: bundler-cache
26
- with:
27
- path: vendor/bundle
28
- key: ${{ runner.os }}-${{ matrix.ruby-version }}-gem-v3-${{ hashFiles('**/Gemfile') }}-${{ hashFiles('**/net-ssh.gemspec') }}
29
- restore-keys: |
30
- ${{ runner.os }}-${{ matrix.ruby-version }}-gem-v3-
31
-
32
- - name: Cache pip
33
- uses: actions/cache@v4
34
- id: pip-cache
35
- with:
36
- path: ~/.cache/pip
37
- key: ${{ runner.os }}-pip-v1
38
- restore-keys: |
39
- ${{ runner.os }}-pip-v1
40
- - name: Bundle install
41
- run: |
42
- gem install bundler ${{ (startsWith(matrix.ruby-version, '2.6.') || startsWith(matrix.ruby-version, '2.7.')) && '-v 2.4.22' || '' }}
43
- bundle config set path 'vendor/bundle'
44
- bundle config set --local path 'vendor/bundle'
45
- bundle install --jobs 4 --retry 3
46
- BUNDLE_GEMFILE=./Gemfile.noed25519 bundle install --jobs 4 --retry 3
47
- env:
48
- BUNDLE_PATH: vendor/bundle
49
-
50
-
51
- - name: Add to etc/hosts
52
- run: |
53
- sudo echo "127.0.0.1 gateway.netssh" | sudo tee -a /etc/hosts
54
- - name: Check sshd_config
55
- run: sudo cat '/etc/ssh/sshd_config' || true
56
- - name: Check sshd_config2
57
- run: sudo cat /etc/ssh/sshd_config.d/*.conf || true
58
- - name: Check sshd pid
59
- run: sudo ps aux | grep sshd
60
- - name: Ansible install
61
- run: |
62
- python -m pip install --upgrade pip
63
- pip install ansible urllib3 pyOpenSSL ndg-httpsclient pyasn1
64
- ansible-galaxy install rvm.ruby
65
- pwd
66
- uname -a
67
- export
68
- who am i
69
- ansible-playbook ./test/integration/playbook.yml -i "localhost," --become -c local -e 'no_rvm=true' -e 'myuser=runner' -e 'mygroup=runner' -e 'homedir=/home/runner'
70
- - name: Check sshd_config
71
- run: sudo cat '/etc/ssh/sshd_config' || true
72
- - name: Check sshd pid
73
- run: sudo ps aux | grep sshd
74
- - name: Check sshd_config2
75
- run: sudo cat /etc/ssh/sshd_config.d/*.conf || true
76
- - name: Run Tests
77
- run: bundle exec rake test
78
- env:
79
- NET_SSH_RUN_INTEGRATION_TESTS: 1
80
- CI: 1
81
- RUBYOPT: '--enable=frozen-string-literal'
82
- - name: Run tests (without rbnacl)
83
- run: bundle exec rake test
84
- env:
85
- BUNDLE_GEMFILE: ./Gemfile.norbnacl
86
- NET_SSH_RUN_INTEGRATION_TESTS: 1
87
- CI: 1
88
- RUBYOPT: '--enable=frozen-string-literal'
89
- - name: Run Tests (without ed25519)
90
- run: bundle exec rake test
91
- env:
92
- BUNDLE_GEMFILE: ./Gemfile.noed25519
93
- NET_SSH_RUN_INTEGRATION_TESTS: 1
94
- CI: 1
95
- RUBYOPT: '--enable=frozen-string-literal'
96
- - name: Run test helper test
97
- run: bundle exec rake test_test
98
- env:
99
- RUBYOPT: '--enable=frozen-string-literal'
@@ -1,16 +0,0 @@
1
- name: Rubocop
2
-
3
- on: [push]
4
-
5
- jobs:
6
- build:
7
- runs-on: ubuntu-latest
8
- steps:
9
- - uses: actions/checkout@v3
10
- - name: Set up Ruby 3.1
11
- uses: ruby/setup-ruby@v1
12
- with:
13
- ruby-version: 3.1
14
- bundler-cache: true
15
- - name: Run RuboCop
16
- run: bundle exec rubocop
data/.gitignore DELETED
@@ -1,15 +0,0 @@
1
- /Gemfile.lock
2
- /Gemfile.noed25519.lock
3
- doc
4
- rdoc
5
- ri
6
- pkg
7
- *.swp
8
- test/integration/.vagrant
9
- test/integration/playbook.retry
10
-
11
- lib/net/ssh/version.rb.old
12
-
13
- .byebug_history
14
-
15
- tryout
data/.rubocop.yml DELETED
@@ -1,22 +0,0 @@
1
- AllCops:
2
- Exclude:
3
- - 'tryout/**/*'
4
- - "vendor/**/.*"
5
- - "vendor/**/*"
6
- NewCops: enable
7
- TargetRubyVersion: 2.6
8
-
9
- inherit_from: .rubocop_todo.yml
10
-
11
- Style/DoubleNegation:
12
- Exclude:
13
- - 'lib/net/ssh/key_factory.rb'
14
-
15
- Layout/LineLength:
16
- Max: 150
17
- Exclude:
18
- - 'test/**/*.rb'
19
- - 'net-ssh.gemspec'
20
-
21
- Style/EmptyLiteral:
22
- Enabled: false