net-ssh 8.0.4 → 8.1.1

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 (52) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGES.txt +14 -0
  4. data/lib/net/ssh/authentication/certificate.rb +2 -2
  5. data/lib/net/ssh/authentication/methods/abstract.rb +4 -0
  6. data/lib/net/ssh/authentication/methods/hostbased.rb +3 -3
  7. data/lib/net/ssh/authentication/methods/publickey.rb +50 -38
  8. data/lib/net/ssh/authentication/session.rb +2 -1
  9. data/lib/net/ssh/buffer.rb +2 -2
  10. data/lib/net/ssh/config.rb +95 -38
  11. data/lib/net/ssh/errors.rb +10 -0
  12. data/lib/net/ssh/known_hosts.rb +85 -30
  13. data/lib/net/ssh/multiplex.rb +3 -2
  14. data/lib/net/ssh/prompt.rb +41 -3
  15. data/lib/net/ssh/transport/algorithms.rb +4 -1
  16. data/lib/net/ssh/transport/session.rb +20 -2
  17. data/lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb +3 -1
  18. data/lib/net/ssh/verifiers/always.rb +16 -1
  19. data/lib/net/ssh/verifiers/never.rb +2 -1
  20. data/lib/net/ssh/version.rb +2 -2
  21. data/lib/net/ssh.rb +17 -5
  22. data.tar.gz.sig +0 -0
  23. metadata +3 -31
  24. metadata.gz.sig +1 -1
  25. data/.dockerignore +0 -9
  26. data/.github/FUNDING.yml +0 -1
  27. data/.github/config/rubocop_linter_action.yml +0 -4
  28. data/.github/pull_request_template.md +0 -1
  29. data/.github/workflows/changelog.yml +0 -18
  30. data/.github/workflows/ci-with-docker.yml +0 -55
  31. data/.github/workflows/ci.yml +0 -84
  32. data/.github/workflows/rubocop.yml +0 -18
  33. data/.gitignore +0 -15
  34. data/.rubocop.yml +0 -26
  35. data/.rubocop_todo.yml +0 -1077
  36. data/CONTRIBUTING.md +0 -34
  37. data/DEVELOPMENT.md +0 -23
  38. data/Dockerfile +0 -32
  39. data/Dockerfile.openssl3 +0 -17
  40. data/Dockerfile.zlib_ng +0 -29
  41. data/Gemfile +0 -15
  42. data/ISSUE_TEMPLATE.md +0 -30
  43. data/Manifest +0 -132
  44. data/Rakefile +0 -214
  45. data/SECURITY.md +0 -4
  46. data/THANKS.txt +0 -110
  47. data/appveyor.yml +0 -46
  48. data/changelog.d/README.md +0 -1
  49. data/docker-compose.yml +0 -17
  50. data/net-ssh-public_cert.pem +0 -21
  51. data/net-ssh.gemspec +0 -45
  52. data/support/ssh_tunnel_bug.rb +0 -65
@@ -26,22 +26,48 @@ module Net
26
26
 
27
27
  def initialize(options = {}); end
28
28
 
29
+ # Whether the default prompt has a terminal or an askpass program to ask with.
30
+ def self.can_ask?
31
+ $stdin.tty? || !askpass.nil?
32
+ end
33
+
34
+ # The SSH_ASKPASS program to ask with instead of the terminal, chosen with
35
+ # the SSH_ASKPASS_REQUIRE and DISPLAY rules described in ssh(1).
36
+ def self.askpass
37
+ program = ENV['SSH_ASKPASS'].to_s
38
+ return nil if program.empty?
39
+
40
+ display = !ENV['DISPLAY'].to_s.empty? || !ENV['WAYLAND_DISPLAY'].to_s.empty?
41
+ case ENV['SSH_ASKPASS_REQUIRE'].to_s.downcase
42
+ when 'force' then program
43
+ when 'never' then nil
44
+ when 'prefer' then (program if display)
45
+ else (program if display && !$stdin.tty?)
46
+ end
47
+ end
48
+
29
49
  # default prompt object implementation. More sophisticated implemenetations
30
50
  # might implement caching.
31
51
  class Prompter
32
52
  def initialize(info)
53
+ @askpass = Prompt.askpass
54
+ @header = []
33
55
  if info[:type] == 'keyboard-interactive'
34
- $stdout.puts(info[:name]) unless info[:name].empty?
35
- $stdout.puts(info[:instruction]) unless info[:instruction].empty?
56
+ @header << info[:name] unless info[:name].empty?
57
+ @header << info[:instruction] unless info[:instruction].empty?
36
58
  end
59
+ $stdout.puts(@header) unless @askpass || @header.empty?
37
60
  end
38
61
 
39
62
  # ask input from user, a prompter might ask for multiple inputs
40
63
  # (like user and password) in a single session.
41
64
  def ask(prompt, echo = true)
65
+ return ask_askpass(prompt) if @askpass
66
+
42
67
  $stdout.print(prompt)
43
68
  $stdout.flush
44
- ret = echo ? $stdin.gets : $stdin.noecho(&:gets)
69
+ hide = !echo && $stdin.tty?
70
+ ret = hide ? $stdin.noecho(&:gets) : $stdin.gets
45
71
  $stdout.print("\n") unless echo
46
72
  ret.chomp
47
73
  end
@@ -49,6 +75,18 @@ module Net
49
75
  # success method will be called when the password was accepted
50
76
  # It's a good time to save password asked to a cache.
51
77
  def success; end
78
+
79
+ private
80
+
81
+ # Like OpenSSH, a cancelled or failed askpass answers with an empty string.
82
+ def ask_askpass(prompt)
83
+ text = (@header + [prompt]).join("\n")
84
+ @header = []
85
+ answer = IO.popen([@askpass, text], &:read)
86
+ Process.last_status.success? ? answer.chomp : ""
87
+ rescue SystemCallError
88
+ ""
89
+ end
52
90
  end
53
91
 
54
92
  # start password session. Multiple questions might be asked multiple times
@@ -424,7 +424,10 @@ module Net
424
424
  # a KEXINIT packet to send to the server. It does not actually send it,
425
425
  # it simply builds the packet and returns it.
426
426
  def build_client_algorithm_packet
427
- kex = algorithms[:kex].join(",")
427
+ kex_names = algorithms[:kex]
428
+ # RFC 8308: ext-info-c is only meaningful in the first key exchange.
429
+ kex_names += %w[ext-info-c] unless session_id
430
+ kex = kex_names.join(",")
428
431
  host_key = algorithms[:host_key].join(",")
429
432
  encryption = algorithms[:encryption].join(",")
430
433
  hmac = algorithms[:hmac].join(",")
@@ -56,6 +56,11 @@ module Net
56
56
  # The hash of options that were given to the object at initialization.
57
57
  attr_reader :options
58
58
 
59
+ # The signature algorithms the server accepts for publickey
60
+ # authentication, from its RFC 8308 server-sig-algs extension, or nil if
61
+ # it did not send one.
62
+ attr_reader :server_sig_algs
63
+
59
64
  # Instantiates a new transport layer abstraction. This will block until
60
65
  # the initial key exchange completes, leaving you with a ready-to-use
61
66
  # transport session.
@@ -219,9 +224,8 @@ module Net
219
224
  when DEBUG
220
225
  send(packet[:always_display] ? :fatal : :debug) { packet[:message] }
221
226
 
222
- # We don't advertise ext-info-c, but some servers send EXT_INFO anyway (#955).
223
227
  when EXT_INFO
224
- debug { "ignoring EXT_INFO packet" }
228
+ accept_ext_info(packet)
225
229
 
226
230
  when KEXINIT
227
231
  algorithms.accept_kexinit(packet)
@@ -300,6 +304,20 @@ module Net
300
304
 
301
305
  private
302
306
 
307
+ # Parses an RFC 8308 EXT_INFO packet, which servers send after the first
308
+ # NEWKEYS and possibly again just before USERAUTH_SUCCESS.
309
+ def accept_ext_info(packet)
310
+ count = packet.read_long or raise Net::SSH::Exception, "malformed EXT_INFO packet from server"
311
+ count.times do
312
+ name = packet.read_string
313
+ value = packet.read_string
314
+ raise Net::SSH::Exception, "malformed EXT_INFO packet from server" if name.nil? || value.nil?
315
+
316
+ debug { "EXT_INFO #{name}: #{value}" }
317
+ @server_sig_algs = value.split(",") if name == "server-sig-algs"
318
+ end
319
+ end
320
+
303
321
  def shift_queue
304
322
  packet = @queue.shift
305
323
  @queued_bytes -= packet.length
@@ -7,11 +7,13 @@ module Net
7
7
  # verify a connection if the server is the localhost and the port is a
8
8
  # nonstandard port number. Those two conditions will typically mean the
9
9
  # connection is being tunnelled through a forwarded port, so the known-hosts
10
- # file will not be helpful (in general).
10
+ # file will not be helpful (in general). A key marked @revoked is refused
11
+ # either way.
11
12
  class AcceptNewOrLocalTunnel < AcceptNew
12
13
  # Tries to determine if the connection is being tunnelled, and if so,
13
14
  # returns true. Otherwise, performs the standard strict verification.
14
15
  def verify(arguments)
16
+ refuse_revoked!(arguments)
15
17
  return true if tunnelled?(arguments)
16
18
 
17
19
  super
@@ -10,10 +10,13 @@ module Net
10
10
  # (HostKeyUnknown). This is in contrast to the "Strict" class, which will
11
11
  # silently add the key to your known_hosts file. If the server does appear at
12
12
  # least once, but the key given does not match any known for the server, an
13
- # exception will be raised (HostKeyMismatch).
13
+ # exception will be raised (HostKeyMismatch). A key marked @revoked in a
14
+ # host file is always refused (HostKeyRevoked).
14
15
  # Otherwise, this returns true.
15
16
  class Always
16
17
  def verify(arguments)
18
+ refuse_revoked!(arguments)
19
+
17
20
  host_keys = arguments[:session].host_keys
18
21
 
19
22
  # We've never seen this host before, so raise an exception.
@@ -47,6 +50,18 @@ module Net
47
50
 
48
51
  private
49
52
 
53
+ # Custom :known_hosts objects may return a host_keys collection with no
54
+ # revocation support.
55
+ def refuse_revoked!(arguments)
56
+ host_keys = arguments[:session].host_keys
57
+ return unless host_keys.respond_to?(:revoked?) && host_keys.revoked?(arguments[:key])
58
+
59
+ exception = HostKeyRevoked.new("fingerprint #{arguments[:fingerprint]} " +
60
+ "is revoked for #{host_keys.host.inspect}")
61
+ exception.data = arguments
62
+ raise exception
63
+ end
64
+
50
65
  # Enforces the @cert-authority certificate constraints for entries that
51
66
  # implement them (Net::SSH::HostKeyEntries::CertAuthority). Non-certificate
52
67
  # entries do not respond to these predicates and are left untouched.
@@ -3,7 +3,8 @@ module Net
3
3
  module Verifiers
4
4
  # This host key verifier simply allows every key it sees, without
5
5
  # any verification. This is simple, but very insecure because it
6
- # exposes you to MiTM attacks.
6
+ # exposes you to MiTM attacks. It does not read the known hosts files,
7
+ # so it accepts keys marked @revoked as well.
7
8
  class Never
8
9
  # Returns true.
9
10
  def verify(arguments)
@@ -49,10 +49,10 @@ module Net
49
49
  MAJOR = 8
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 = 4
55
+ TINY = 1
56
56
 
57
57
  # The prerelease component of this version of the Net::SSH library
58
58
  # nil allowed
data/lib/net/ssh.rb CHANGED
@@ -69,7 +69,7 @@ module Net
69
69
  host_name user properties passphrase keys_only max_pkt_size
70
70
  max_win_size send_env set_env use_agent number_of_password_prompts
71
71
  append_all_supported_algorithms non_interactive password_prompt
72
- agent_socket_factory minimum_dh_bits verify_host_key
72
+ prompt_without_tty agent_socket_factory minimum_dh_bits verify_host_key
73
73
  fingerprint_hash check_host_ip pubkey_algorithms no_delay
74
74
  control_master control_path preopen_channels
75
75
  ]
@@ -216,7 +216,10 @@ module Net
216
216
  # * :non_interactive => set to true if your app is non interactive and prefers
217
217
  # authentication failure vs password prompt. Non-interactive applications
218
218
  # should set it to true to prefer failing a password/etc auth methods vs.
219
- # asking for password.
219
+ # asking for password. Like OpenSSH, Net::SSH never prompts when $stdin is
220
+ # not a TTY (e.g. in a background job), so it defaults to +true+ then,
221
+ # unless :password_prompt or :prompt_without_tty is given or an
222
+ # SSH_ASKPASS program can be used (see Net::SSH::Prompt.askpass).
220
223
  # * :passphrase => the passphrase to use when loading a private key (default
221
224
  # is +nil+, for no passphrase)
222
225
  # * :password => the password to use to login
@@ -227,6 +230,10 @@ module Net
227
230
  # costs one round trip instead of two. The spare counts against the
228
231
  # server's MaxSessions; if the server refuses it, pre-opening stops for
229
232
  # the session. Defaults to +false+.
233
+ # * :prompt_without_tty => set to +true+ to prompt for passwords, key
234
+ # passphrases and keyboard-interactive responses on $stdout/$stdin even
235
+ # when $stdin is not a TTY, e.g. to read a password piped into the
236
+ # process. Defaults to +false+.
230
237
  # * :properties => a hash of key/value pairs to add to the new connection's
231
238
  # properties (see Net::SSH::Connection::Session#properties)
232
239
  # * :proxy => a proxy instance (see Proxy) to use when connecting
@@ -306,7 +313,7 @@ module Net
306
313
  assign_defaults(options)
307
314
 
308
315
  options[:user] = user if user
309
- options = configuration_for(host, options.fetch(:config, true)).merge(options)
316
+ options = configuration_for(host, options.fetch(:config, true), user: options[:user]).merge(options)
310
317
  host = options.fetch(:host_name, host)
311
318
 
312
319
  options[:check_host_ip] = true unless options.key?(:check_host_ip)
@@ -365,15 +372,17 @@ module Net
365
372
  # be a file name (or array of file names) of SSH configuration file(s)
366
373
  # to read.
367
374
  #
375
+ # +user+ is the explicitly requested remote user, matched by <tt>Match User</tt>.
376
+ #
368
377
  # See Net::SSH::Config for the full description of all supported options.
369
- def self.configuration_for(host, use_ssh_config)
378
+ def self.configuration_for(host, use_ssh_config, user: nil)
370
379
  files = case use_ssh_config
371
380
  when true then Net::SSH::Config.expandable_default_files
372
381
  when false, nil then return {}
373
382
  else Array(use_ssh_config)
374
383
  end
375
384
 
376
- Net::SSH::Config.for(host, files)
385
+ Net::SSH::Config.for(host, files, user: user)
377
386
  end
378
387
 
379
388
  def self.assign_defaults(options)
@@ -382,6 +391,9 @@ module Net
382
391
  options[:logger].level = Logger::FATAL
383
392
  end
384
393
 
394
+ unless options[:password_prompt] || options[:prompt_without_tty] || Prompt.can_ask?
395
+ options[:non_interactive] = true
396
+ end
385
397
  options[:password_prompt] ||= Prompt.default(options)
386
398
 
387
399
  %i[password passphrase].each do |key|
data.tar.gz.sig CHANGED
Binary file
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: 8.0.4
4
+ version: 8.1.1
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,7 +32,7 @@ cert_chain:
32
32
  ufHf4AX2UIkJbh7zCPkiNCqIr7MSWLNFG/9lOlHYsEJM8XujT1ofPobYx6YSFx/C
33
33
  7HBrI7UX7awt6UvBZebhcHzyMHxg/B5PVQllPA==
34
34
  -----END CERTIFICATE-----
35
- date: 2026-10-25 00:00:00.000000000 Z
35
+ date: 2026-11-06 00:00:00.000000000 Z
36
36
  dependencies:
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: logger
@@ -191,34 +191,9 @@ extra_rdoc_files:
191
191
  - LICENSE.txt
192
192
  - README.md
193
193
  files:
194
- - ".dockerignore"
195
- - ".github/FUNDING.yml"
196
- - ".github/config/rubocop_linter_action.yml"
197
- - ".github/pull_request_template.md"
198
- - ".github/workflows/changelog.yml"
199
- - ".github/workflows/ci-with-docker.yml"
200
- - ".github/workflows/ci.yml"
201
- - ".github/workflows/rubocop.yml"
202
- - ".gitignore"
203
- - ".rubocop.yml"
204
- - ".rubocop_todo.yml"
205
194
  - CHANGES.txt
206
- - CONTRIBUTING.md
207
- - DEVELOPMENT.md
208
- - Dockerfile
209
- - Dockerfile.openssl3
210
- - Dockerfile.zlib_ng
211
- - Gemfile
212
- - ISSUE_TEMPLATE.md
213
195
  - LICENSE.txt
214
- - Manifest
215
196
  - README.md
216
- - Rakefile
217
- - SECURITY.md
218
- - THANKS.txt
219
- - appveyor.yml
220
- - changelog.d/README.md
221
- - docker-compose.yml
222
197
  - lib/net/ssh.rb
223
198
  - lib/net/ssh/authentication/agent.rb
224
199
  - lib/net/ssh/authentication/certificate.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
metadata.gz.sig CHANGED
@@ -1 +1 @@
1
- �b�Qs� Ţ��)֙wR��NC����UҀ@�VN��M� �d��өTB��ZC "y_�]=!�� ��0:s�v+!E�����x���y����ٻȰz[3'f��
1
+ ����K�#��إ�TJ�q�3v|�6e`�gI;f�s�"O)�R��/�?��
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 +0,0 @@
1
- <!-- After opening the PR, add a changelog.d/<PR number>.<type>.txt fragment (none, change, security, breaking or breaking-security) instead of editing CHANGES.txt; see CONTRIBUTING.md#changelog. -->
@@ -1,18 +0,0 @@
1
- name: Changelog
2
-
3
- on:
4
- pull_request:
5
- types: [opened, synchronize, reopened, labeled, unlabeled]
6
-
7
- permissions:
8
- contents: read
9
-
10
- jobs:
11
- changelog:
12
- runs-on: ubuntu-latest
13
- steps:
14
- - uses: actions/checkout@v4
15
- with:
16
- # HEAD is the PR merged into the base branch; HEAD^1 is the base it was merged into.
17
- fetch-depth: 2
18
- - uses: net-ssh/changelogd@v1
@@ -1,55 +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.7
21
- run: docker compose run ruby-2.7
22
-
23
- - name: Run ruby 3.0
24
- run: docker compose run ruby-3.0
25
-
26
- - name: Run ruby 3.1
27
- run: docker compose run ruby-3.1
28
-
29
- test_openssl3:
30
- name: Run test suite with docker and openssl 3.0
31
- runs-on: ubuntu-latest
32
-
33
- steps:
34
- - name: Checkout code
35
- uses: actions/checkout@v4
36
-
37
- - name: Build docker images
38
- run: docker build -t netssh_openssl3 -f Dockerfile.openssl3 .
39
-
40
- - name: Run ruby 3.0 with openssl3
41
- run: docker run --rm netssh_openssl3
42
-
43
- test_zlib_ng:
44
- name: Run test suite with docker and zlib-ng
45
- runs-on: ubuntu-latest
46
-
47
- steps:
48
- - name: Checkout code
49
- uses: actions/checkout@v4
50
-
51
- - name: Build docker images
52
- run: docker build -t netssh_zlib_ng -f Dockerfile.zlib_ng .
53
-
54
- - name: Run ruby with zlib-ng
55
- run: docker run --rm netssh_zlib_ng
@@ -1,84 +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.7.8, 3.0.6, 3.1.3, 3.2.1, 3.3, 3.4, '4.0']
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.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
- env:
47
- BUNDLE_PATH: vendor/bundle
48
-
49
-
50
- - name: Add to etc/hosts
51
- run: |
52
- sudo echo "127.0.0.1 gateway.netssh" | sudo tee -a /etc/hosts
53
- - name: Check sshd_config
54
- run: sudo cat '/etc/ssh/sshd_config' || true
55
- - name: Check sshd_config2
56
- run: sudo cat /etc/ssh/sshd_config.d/*.conf || true
57
- - name: Check sshd pid
58
- run: sudo ps aux | grep sshd
59
- - name: Ansible install
60
- run: |
61
- python -m pip install --upgrade pip
62
- pip install ansible urllib3 pyOpenSSL ndg-httpsclient pyasn1
63
- ansible-galaxy install rvm.ruby
64
- pwd
65
- uname -a
66
- export
67
- who am i
68
- 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'
69
- - name: Check sshd_config
70
- run: sudo cat '/etc/ssh/sshd_config' || true
71
- - name: Check sshd pid
72
- run: sudo ps aux | grep sshd
73
- - name: Check sshd_config2
74
- run: sudo cat /etc/ssh/sshd_config.d/*.conf || true
75
- - name: Run Tests
76
- run: bundle exec rake test
77
- env:
78
- NET_SSH_RUN_INTEGRATION_TESTS: 1
79
- CI: 1
80
- RUBYOPT: '--enable=frozen-string-literal'
81
- - name: Run test helper test
82
- run: bundle exec rake test_test
83
- env:
84
- RUBYOPT: '--enable=frozen-string-literal'
@@ -1,18 +0,0 @@
1
- name: Rubocop
2
-
3
- on:
4
- pull_request:
5
- push: { branches: master }
6
-
7
- jobs:
8
- build:
9
- runs-on: ubuntu-latest
10
- steps:
11
- - uses: actions/checkout@v3
12
- - name: Set up Ruby 3.1
13
- uses: ruby/setup-ruby@v1
14
- with:
15
- ruby-version: 3.1
16
- bundler-cache: true
17
- - name: Run RuboCop
18
- 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,26 +0,0 @@
1
- AllCops:
2
- Exclude:
3
- - 'tryout/**/*'
4
- - "vendor/**/.*"
5
- - "vendor/**/*"
6
- NewCops: enable
7
- TargetRubyVersion: 2.7
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
23
-
24
- # CI runs the suite with RUBYOPT=--enable=frozen-string-literal instead of a magic comment in every file.
25
- Style/FrozenStringLiteralComment:
26
- Enabled: false