net-ssh 8.0.4 → 8.1.0

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 (47) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGES.txt +10 -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/multiplex.rb +3 -2
  12. data/lib/net/ssh/prompt.rb +41 -3
  13. data/lib/net/ssh/transport/algorithms.rb +4 -1
  14. data/lib/net/ssh/transport/session.rb +20 -2
  15. data/lib/net/ssh/version.rb +2 -2
  16. data/lib/net/ssh.rb +17 -5
  17. data.tar.gz.sig +0 -0
  18. metadata +3 -31
  19. metadata.gz.sig +1 -1
  20. data/.dockerignore +0 -9
  21. data/.github/FUNDING.yml +0 -1
  22. data/.github/config/rubocop_linter_action.yml +0 -4
  23. data/.github/pull_request_template.md +0 -1
  24. data/.github/workflows/changelog.yml +0 -18
  25. data/.github/workflows/ci-with-docker.yml +0 -55
  26. data/.github/workflows/ci.yml +0 -84
  27. data/.github/workflows/rubocop.yml +0 -18
  28. data/.gitignore +0 -15
  29. data/.rubocop.yml +0 -26
  30. data/.rubocop_todo.yml +0 -1077
  31. data/CONTRIBUTING.md +0 -34
  32. data/DEVELOPMENT.md +0 -23
  33. data/Dockerfile +0 -32
  34. data/Dockerfile.openssl3 +0 -17
  35. data/Dockerfile.zlib_ng +0 -29
  36. data/Gemfile +0 -15
  37. data/ISSUE_TEMPLATE.md +0 -30
  38. data/Manifest +0 -132
  39. data/Rakefile +0 -214
  40. data/SECURITY.md +0 -4
  41. data/THANKS.txt +0 -110
  42. data/appveyor.yml +0 -46
  43. data/changelog.d/README.md +0 -1
  44. data/docker-compose.yml +0 -17
  45. data/net-ssh-public_cert.pem +0 -21
  46. data/net-ssh.gemspec +0 -45
  47. data/support/ssh_tunnel_bug.rb +0 -65
data/CONTRIBUTING.md DELETED
@@ -1,34 +0,0 @@
1
- # Contributing to net-ssh
2
-
3
- Run the unit tests with `bundle exec rake test` and the linter with `bundle exec rubocop`; see [README.md](README.md) and [DEVELOPMENT.md](DEVELOPMENT.md) for integration tests and debugging tips.
4
-
5
- ## Changelog
6
-
7
- Don't edit `CHANGES.txt`. Instead, add a fragment file to `changelog.d/` in your PR; the release's version bump (`rake vbump:*`) moves all fragments into a new `=== <version>` section at the top of `CHANGES.txt` and deletes them.
8
-
9
- A fragment is named `<number>.<type>.txt`, where `<number>` is the PR number (so open the PR first, then add the fragment), and contains a single UTF-8 paragraph: the entry as it should read in `CHANGES.txt`, without the bullet or prefix. Lines are joined, so it can be wrapped. If it doesn't end with a reference list such as `[#985, #1056]` or `[GHSA-xxxx-xxxx-xxxx]`, ` [#<number>]` is appended.
10
-
11
- | Type | Written as | Use for |
12
- | ------------------- | ------------------------------ | ------------------------------------------------------------ |
13
- | `breaking-security` | `* BREAKING: Security: <text>` | an incompatible change made for security |
14
- | `breaking` | `* BREAKING: <text>` | an incompatible change |
15
- | `security` | `* Security: <text>` | a security fix or hardening |
16
- | `change` | `* <text>` | any other user-visible fix or feature |
17
- | `none` | nothing | PRs with no user-visible change (tests, CI, docs, refactors) |
18
-
19
- Examples:
20
-
21
- ```sh
22
- rake "changelog:new[1058,change,Session#exec! now returns the exit status]"
23
- # changelog.d/1058.change.txt -> * Session#exec! now returns the exit status [#1058]
24
-
25
- echo 'Removed the `:paranoid` option; use `:verify_host_key` [#1050]' > changelog.d/1050.breaking.txt
26
- echo 'Reject packet lengths above 256 KB, as OpenSSH does [GHSA-pfqh-p9vh-wx4p]' > changelog.d/1060.security.txt
27
- touch changelog.d/1061.none.txt
28
- ```
29
-
30
- For several entries from one PR add a suffix: `1050.breaking.txt`, `1050.breaking.2.txt` (`changelog:new` picks the next free one).
31
-
32
- `rake changelog:check` validates the fragments and `rake changelog:preview` prints the section the next release would add. CI fails a PR that edits `CHANGES.txt` or doesn't add or modify a `changelog.d/<PR number>.<type>.txt` fragment, unless it only touches `changelog.d/` or a maintainer adds the `skip-changelog` label; Dependabot PRs are skipped.
33
-
34
- The full rules, including how a release orders the entries, are in the [changelogd README](https://github.com/net-ssh/changelogd#readme).
data/DEVELOPMENT.md DELETED
@@ -1,23 +0,0 @@
1
- ### Development notes
2
-
3
- ## Building/running ssh server in debug mode
4
-
5
- clone the openssh server from `https://github.com/openssh/openssh-portable`
6
-
7
- ```sh
8
- brew install openssl
9
- /usr/local/Cellar/openssl@3/3.1.0/bin/openssl
10
-
11
- autoreconf
12
- ./configure --with-ssl-dir=/usr/local/Cellar/openssl@3/3.1.0/ --with-audit=debug --enable-debug CPPFLAGS="-DDEBUG -DPACKET_DEBUG" CFLAGS="-g -O0"
13
- make
14
- ```
15
-
16
- To run server in debug mode:
17
- ```sh
18
- echo '#' > /tmp/sshd_config
19
- ssh-keygen -t rsa -f /tmp/ssh_host_rsa_key
20
- # /Users/boga/Work/OSS/NetSSH/openssh-portable/sshd -p 2222 -D -d -d -d -e -f /tmp/sshd_config
21
- /Users/boga/Work/OSS/NetSSH/openssh-portable/sshd -p 2222 -D -d -d -d -e -f /tmp/sshd_config -h /tmp/ssh_host_rsa_key
22
-
23
- ```
data/Dockerfile DELETED
@@ -1,32 +0,0 @@
1
- ARG RUBY_VERSION=3.1
2
- FROM ruby:${RUBY_VERSION}
3
-
4
- ARG BUNDLERV=
5
-
6
- # Ruby 2.7 and 3.0 images are built on Debian bullseye, which only archive.debian.org still serves.
7
- RUN if grep -q bullseye /etc/os-release; then sed -i 's|deb.debian.org|archive.debian.org|' /etc/apt/sources.list; fi
8
-
9
- RUN apt update && apt install -y openssh-server sudo netcat-openbsd \
10
- && useradd --create-home --shell '/bin/bash' --comment 'NetSSH' 'net_ssh_1' \
11
- && useradd --create-home --shell '/bin/bash' --comment 'NetSSH' 'net_ssh_2' \
12
- && echo net_ssh_1:foopwd | chpasswd \
13
- && echo net_ssh_2:foo2pwd | chpasswd \
14
- && mkdir -p /home/net_ssh_1/.ssh \
15
- && mkdir -p /home/net_ssh_2/.ssh \
16
- && echo "net_ssh_1 ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
17
- && echo "net_ssh_2 ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
18
- && ssh-keygen -f /etc/ssh/users_ca -N ''
19
-
20
- ENV INSTALL_PATH="/netssh"
21
-
22
- WORKDIR $INSTALL_PATH
23
-
24
- COPY Gemfile net-ssh.gemspec $INSTALL_PATH/
25
-
26
- COPY lib/net/ssh/version.rb $INSTALL_PATH/lib/net/ssh/version.rb
27
-
28
- RUN gem install bundler ${BUNDLERV} && bundle install
29
-
30
- COPY . $INSTALL_PATH/
31
-
32
- CMD service ssh start && rake test
data/Dockerfile.openssl3 DELETED
@@ -1,17 +0,0 @@
1
- FROM ubuntu:22.04
2
-
3
- ENV INSTALL_PATH="/netssh"
4
-
5
- RUN apt update && apt install -y openssl libssl-dev ruby ruby-dev git build-essential
6
-
7
- WORKDIR $INSTALL_PATH
8
-
9
- COPY Gemfile net-ssh.gemspec $INSTALL_PATH/
10
-
11
- COPY lib/net/ssh/version.rb $INSTALL_PATH/lib/net/ssh/version.rb
12
-
13
- RUN ls -l && gem install bundler && bundle install
14
-
15
- COPY . $INSTALL_PATH/
16
-
17
- CMD openssl version && ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION' && rake test
data/Dockerfile.zlib_ng DELETED
@@ -1,29 +0,0 @@
1
- FROM fedora:latest
2
-
3
- ENV INSTALL_PATH="/netssh"
4
-
5
- # Fedora's OpenSSL 3.x blocks SHA-1 for RSA/DSA signing by default.
6
- # - LEGACY crypto policy relaxes the system-wide restrictions.
7
- # - OPENSSL_CONF points to our config which activates the legacy provider,
8
- # sets SECLEVEL=0, and sets rh-allow-sha1-signatures=yes (Fedora/RHEL
9
- # OpenSSL patch that gates SHA-1 signing independently of the policy level).
10
- # OPENSSL_CONF must be set as a Docker ENV so it is in the environment before
11
- # Ruby/OpenSSL initialises — setting it in the Rakefile is too late.
12
- ENV OPENSSL_CONF="/netssh/test/openssl3.conf"
13
-
14
- RUN dnf install -y openssl openssl-devel ruby ruby-devel git make gcc redhat-rpm-config zlib-ng crypto-policies-scripts && \
15
- update-crypto-policies --set LEGACY
16
-
17
- WORKDIR $INSTALL_PATH
18
-
19
- COPY Gemfile net-ssh.gemspec $INSTALL_PATH/
20
-
21
- COPY lib/net/ssh/version.rb $INSTALL_PATH/lib/net/ssh/version.rb
22
-
23
- RUN ls -l && gem install bundler && bundle install
24
-
25
- COPY . $INSTALL_PATH/
26
-
27
- CMD openssl version && ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION' && \
28
- rpm -q zlib-ng && ruby -rzlib -e 'puts Zlib.zlib_version' && \
29
- rake test
data/Gemfile DELETED
@@ -1,15 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in mygem.gemspec
4
- gemspec
5
-
6
- gem "changelogd", git: "https://github.com/net-ssh/changelogd.git", tag: "v1", group: :development
7
-
8
- gem 'byebug', group: %i[development test] if !Gem.win_platform? && RUBY_ENGINE == "ruby"
9
-
10
- if ENV["CI"]
11
- gem 'codecov', require: false, group: :test
12
- gem 'simplecov', require: false, group: :test
13
- end
14
-
15
- gem 'webrick', group: %i[development test] if RUBY_VERSION.split(".")[0].to_i >= 3
data/ISSUE_TEMPLATE.md DELETED
@@ -1,30 +0,0 @@
1
- ### Expected behavior
2
-
3
- Tell us what should happen
4
-
5
- ### Actual behavior
6
-
7
- Tell us what happens instead.
8
-
9
- ### System configuration
10
-
11
- - net-ssh version
12
- - Ruby version
13
-
14
- ### Example App
15
-
16
- Please provide an example script that reproduces the problem. This will save maintainers time so they can spend it fixing your issues instead of trying to build a reproduction case from sparse instructions.
17
-
18
- You can use this as stating point:
19
-
20
- ```ruby
21
- gem 'net-ssh', '= 4.0.0.beta3'
22
- require 'net/ssh'
23
- puts Net::SSH::Version::CURRENT
24
-
25
- @host = 'localhost'
26
- @user = ENV['USER']
27
- Net::SSH.start(@host, @user) do |ssh|
28
- puts ssh.exec!('echo "hello"')
29
- end
30
- ```
data/Manifest DELETED
@@ -1,132 +0,0 @@
1
- CHANGELOG.rdoc
2
- Manifest
3
- README.rdoc
4
- Rakefile
5
- Rudyfile
6
- THANKS.rdoc
7
- lib/net/ssh.rb
8
- lib/net/ssh/authentication/agent.rb
9
- lib/net/ssh/authentication/constants.rb
10
- lib/net/ssh/authentication/key_manager.rb
11
- lib/net/ssh/authentication/methods/abstract.rb
12
- lib/net/ssh/authentication/methods/hostbased.rb
13
- lib/net/ssh/authentication/methods/keyboard_interactive.rb
14
- lib/net/ssh/authentication/methods/password.rb
15
- lib/net/ssh/authentication/methods/publickey.rb
16
- lib/net/ssh/authentication/pageant.rb
17
- lib/net/ssh/authentication/session.rb
18
- lib/net/ssh/buffer.rb
19
- lib/net/ssh/buffered_io.rb
20
- lib/net/ssh/config.rb
21
- lib/net/ssh/connection/channel.rb
22
- lib/net/ssh/connection/constants.rb
23
- lib/net/ssh/connection/session.rb
24
- lib/net/ssh/connection/term.rb
25
- lib/net/ssh/errors.rb
26
- lib/net/ssh/key_factory.rb
27
- lib/net/ssh/known_hosts.rb
28
- lib/net/ssh/loggable.rb
29
- lib/net/ssh/packet.rb
30
- lib/net/ssh/prompt.rb
31
- lib/net/ssh/proxy/command.rb
32
- lib/net/ssh/proxy/errors.rb
33
- lib/net/ssh/proxy/http.rb
34
- lib/net/ssh/proxy/socks4.rb
35
- lib/net/ssh/proxy/socks5.rb
36
- lib/net/ssh/service/forward.rb
37
- lib/net/ssh/test.rb
38
- lib/net/ssh/test/channel.rb
39
- lib/net/ssh/test/extensions.rb
40
- lib/net/ssh/test/kex.rb
41
- lib/net/ssh/test/local_packet.rb
42
- lib/net/ssh/test/packet.rb
43
- lib/net/ssh/test/remote_packet.rb
44
- lib/net/ssh/test/script.rb
45
- lib/net/ssh/test/socket.rb
46
- lib/net/ssh/transport/algorithms.rb
47
- lib/net/ssh/transport/cipher_factory.rb
48
- lib/net/ssh/transport/constants.rb
49
- lib/net/ssh/transport/ctr.rb
50
- lib/net/ssh/transport/hmac.rb
51
- lib/net/ssh/transport/hmac/abstract.rb
52
- lib/net/ssh/transport/hmac/md5.rb
53
- lib/net/ssh/transport/hmac/md5_96.rb
54
- lib/net/ssh/transport/hmac/none.rb
55
- lib/net/ssh/transport/hmac/ripemd160.rb
56
- lib/net/ssh/transport/hmac/sha1.rb
57
- lib/net/ssh/transport/hmac/sha1_96.rb
58
- lib/net/ssh/transport/hmac/sha2_256.rb
59
- lib/net/ssh/transport/hmac/sha2_256_96.rb
60
- lib/net/ssh/transport/hmac/sha2_512.rb
61
- lib/net/ssh/transport/hmac/sha2_512_96.rb
62
- lib/net/ssh/transport/identity_cipher.rb
63
- lib/net/ssh/transport/key_expander.rb
64
- lib/net/ssh/transport/kex.rb
65
- lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb
66
- lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb
67
- lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb
68
- lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb
69
- lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb
70
- lib/net/ssh/transport/kex/ecdh_sha2_nistp384.rb
71
- lib/net/ssh/transport/kex/ecdh_sha2_nistp521.rb
72
- lib/net/ssh/transport/openssl.rb
73
- lib/net/ssh/transport/packet_stream.rb
74
- lib/net/ssh/transport/server_version.rb
75
- lib/net/ssh/transport/session.rb
76
- lib/net/ssh/transport/state.rb
77
- lib/net/ssh/verifiers/accept_new.rb
78
- lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb
79
- lib/net/ssh/verifiers/always.rb
80
- lib/net/ssh/verifiers/never.rb
81
- lib/net/ssh/version.rb
82
- net-ssh.gemspec
83
- setup.rb
84
- support/arcfour_check.rb
85
- support/ssh_tunnel_bug.rb
86
- test/authentication/methods/common.rb
87
- test/authentication/methods/test_abstract.rb
88
- test/authentication/methods/test_hostbased.rb
89
- test/authentication/methods/test_keyboard_interactive.rb
90
- test/authentication/methods/test_password.rb
91
- test/authentication/methods/test_publickey.rb
92
- test/authentication/test_agent.rb
93
- test/authentication/test_key_manager.rb
94
- test/authentication/test_session.rb
95
- test/common.rb
96
- test/configs/eqsign
97
- test/configs/exact_match
98
- test/configs/host_plus
99
- test/configs/multihost
100
- test/configs/wild_cards
101
- test/connection/test_channel.rb
102
- test/connection/test_session.rb
103
- test/test_all.rb
104
- test/test_buffer.rb
105
- test/test_buffered_io.rb
106
- test/test_config.rb
107
- test/test_key_factory.rb
108
- test/transport/hmac/test_md5.rb
109
- test/transport/hmac/test_md5_96.rb
110
- test/transport/hmac/test_none.rb
111
- test/transport/hmac/test_ripemd160.rb
112
- test/transport/hmac/test_sha1.rb
113
- test/transport/hmac/test_sha1_96.rb
114
- test/transport/hmac/test_sha2_256.rb
115
- test/transport/hmac/test_sha2_256_96.rb
116
- test/transport/hmac/test_sha2_512.rb
117
- test/transport/hmac/test_sha2_512_96.rb
118
- test/transport/kex/test_diffie_hellman_group1_sha1.rb
119
- test/transport/kex/test_diffie_hellman_group14_sha1.rb
120
- test/transport/kex/test_diffie_hellman_group_exchange_sha1.rb
121
- test/transport/kex/test_diffie_hellman_group_exchange_sha256.rb
122
- test/transport/kex/test_ecdh_sha2_nistp256.rb
123
- test/transport/kex/test_ecdh_sha2_nistp384.rb
124
- test/transport/kex/test_ecdh_sha2_nistp521.rb
125
- test/transport/test_algorithms.rb
126
- test/transport/test_cipher_factory.rb
127
- test/transport/test_hmac.rb
128
- test/transport/test_identity_cipher.rb
129
- test/transport/test_packet_stream.rb
130
- test/transport/test_server_version.rb
131
- test/transport/test_session.rb
132
- test/transport/test_state.rb
data/Rakefile DELETED
@@ -1,214 +0,0 @@
1
- #
2
- # Also in your terminal environment run:
3
- # $ export LANG=en_US.UTF-8
4
- # $ export LANGUAGE=en_US.UTF-8
5
- # $ export LC_ALL=en_US.UTF-8
6
-
7
- require "rubygems"
8
- require "rake"
9
- require "rake/clean"
10
- require "bundler/gem_tasks"
11
-
12
- begin
13
- require "rdoc/task"
14
- rescue LoadError
15
- # rdoc is no longer a default gem as of Ruby 4.0; the rest of the Rakefile works without it.
16
- end
17
-
18
- desc "When releasing make sure NET_SSH_BUILDGEM_SIGNED is set"
19
- task :check_NET_SSH_BUILDGEM_SIGNED do
20
- raise "NET_SSH_BUILDGEM_SIGNED should be set to release" unless ENV['NET_SSH_BUILDGEM_SIGNED']
21
- end
22
-
23
- Rake::Task[:release].enhance [:check_NET_SSH_BUILDGEM_SIGNED]
24
- Rake::Task[:release].prerequisites.unshift(:check_NET_SSH_BUILDGEM_SIGNED)
25
-
26
- task default: ["build"]
27
- CLEAN.include ['pkg', 'rdoc']
28
- name = "net-ssh"
29
-
30
- require_relative "lib/net/ssh/version"
31
- version = Net::SSH::Version::CURRENT
32
-
33
- begin
34
- require "changelogd/rake"
35
- rescue LoadError
36
- # A git gem isn't on the load path under plain `rake`, as the release workflow runs it; bundler/setup could clash with the running rake.
37
- require "bundler"
38
- $LOAD_PATH.unshift(*Bundler.definition.specs["changelogd"].flat_map(&:full_require_paths))
39
- require "changelogd/rake"
40
- end
41
- Changelogd::RakeTasks.new(version_file: "lib/net/ssh/version.rb")
42
-
43
- extra_files = %w[LICENSE.txt THANKS.txt CHANGES.txt]
44
- if defined?(RDoc::Task)
45
- RDoc::Task.new do |rdoc|
46
- rdoc.rdoc_dir = "rdoc"
47
- rdoc.title = "#{name} #{version}"
48
- rdoc.generator = 'hanna' # gem install hanna-nouveau
49
- rdoc.main = 'README.md'
50
- rdoc.rdoc_files.include("README*")
51
- rdoc.rdoc_files.include("bin/*.rb")
52
- rdoc.rdoc_files.include("lib/**/*.rb")
53
- extra_files.each { |file|
54
- rdoc.rdoc_files.include(file) if File.exist?(file)
55
- }
56
- end
57
- end
58
-
59
- namespace :cert do
60
- desc "Update public cert from private - only run if public is expired"
61
- task :update_public_when_expired do
62
- require 'openssl'
63
- require 'time'
64
- raw = File.read "net-ssh-public_cert.pem"
65
- certificate = OpenSSL::X509::Certificate.new raw
66
- raise Exception, "Not yet expired: #{certificate.not_after}" unless certificate.not_after < Time.now
67
-
68
- sh "gem cert --build netssh@solutious.com --days 365*5 --private-key /mnt/gem/net-ssh-private_key.pem"
69
- sh "mv gem-public_cert.pem net-ssh-public_cert.pem"
70
- sh "gem cert --add net-ssh-public_cert.pem"
71
- end
72
- end
73
-
74
- def change_version(&block)
75
- Rake::Task["changelog:check"].invoke
76
- version_file = 'lib/net/ssh/version.rb'
77
- require_relative version_file
78
- pre = Net::SSH::Version::PRE
79
- tiny = Net::SSH::Version::TINY
80
- result = block[pre: pre, tiny: Net::SSH::Version::TINY]
81
- raise ArgumentError, "Version change logic should always return a pre" unless result.key?(:pre)
82
-
83
- new_pre = result[:pre]
84
- new_tiny = result[:tiny] || tiny
85
- found = { pre: false, tiny: false }
86
- File.open("#{version_file}.new", "w") do |f|
87
- File.readlines(version_file).each do |line|
88
- match =
89
- if pre.nil?
90
- /^(\s+PRE\s+=\s+)nil(\s*)$/.match(line)
91
- else
92
- /^(\s+PRE\s+=\s+")#{pre}("\s*)$/.match(line)
93
- end
94
- if match
95
- prefix = match[1]
96
- postfix = match[2]
97
- prefix.delete_suffix!('"')
98
- postfix.delete_prefix!('"')
99
- new_line = "#{prefix}#{new_pre.inspect}#{postfix}"
100
- puts "Changing:\n - #{line} + #{new_line}"
101
- line = new_line
102
- found[:pre] = true
103
- end
104
-
105
- if new_tiny != tiny
106
- match = /^(\s+TINY\s+=\s+)#{tiny}(\s*)$/.match(line)
107
- if match
108
- prefix = match[1]
109
- postfix = match[2]
110
- new_line = "#{prefix}#{new_tiny}#{postfix}"
111
- puts "Changing:\n - #{line} + #{new_line}"
112
- line = new_line
113
- found[:tiny] = true
114
- end
115
- end
116
-
117
- f.write(line)
118
- end
119
- raise ArgumentError, "Cound not find line: PRE = \"#{pre}\" in #{version_file}" unless found[:pre]
120
- raise ArgumentError, "Cound not find line: TINY = \"#{tiny}\" in #{version_file}" unless found[:tiny] || new_tiny == tiny
121
- end
122
-
123
- FileUtils.mv version_file, "#{version_file}.old"
124
- FileUtils.mv "#{version_file}.new", version_file
125
- Rake::Task["changelog:release"].invoke
126
- end
127
-
128
- namespace :vbump do
129
- desc "Final release"
130
- task :final do
131
- change_version do |pre:, tiny:|
132
- _ = tiny
133
- if pre.nil?
134
- { tiny: tiny + 1, pre: nil }
135
- else
136
- raise ArgumentError, "Unexpected pre: #{pre}" if pre.nil?
137
-
138
- { pre: nil }
139
- end
140
- end
141
- end
142
-
143
- desc "Increment prerelease"
144
- task :pre, [:type] do |_t, args|
145
- change_version do |pre:, tiny:|
146
- puts " PRE => #{pre.inspect}"
147
- match = /^([a-z]+)(\d+)/.match(pre)
148
- raise ArgumentError, "Unexpected pre: #{pre}" if match.nil? && args[:type].nil?
149
-
150
- if match.nil? || (!args[:type].nil? && args[:type] != match[1])
151
- if pre.nil?
152
- { pre: "#{args[:type]}1", tiny: tiny + 1 }
153
- else
154
- { pre: "#{args[:type]}1" }
155
- end
156
- else
157
- { pre: "#{match[1]}#{match[2].to_i + 1}" }
158
- end
159
- end
160
- end
161
- end
162
-
163
- namespace :rdoc do
164
- desc "Update gh-pages branch"
165
- task :publish do
166
- # copy/checkout
167
- rm_rf "/tmp/net-ssh-rdoc"
168
- rm_rf "/tmp/net-ssh-gh-pages"
169
- cp_r "./rdoc", "/tmp/net-ssh-rdoc"
170
- mkdir "/tmp/net-ssh-gh-pages"
171
- Dir.chdir "/tmp/net-ssh-gh-pages" do
172
- sh "git clone --branch gh-pages --single-branch https://github.com/net-ssh/net-ssh"
173
- rm_rf "/tmp/net-ssh-gh-pages/net-ssh/*"
174
- end
175
- # update
176
- sh "cp -rf ./rdoc/* /tmp/net-ssh-gh-pages/net-ssh/"
177
- Dir.chdir "/tmp/net-ssh-gh-pages/net-ssh" do
178
- sh "git add -A ."
179
- sh "git commit -m \"Update docs\""
180
- end
181
- # publish
182
- Dir.chdir "/tmp/net-ssh-gh-pages/net-ssh" do
183
- sh "git push origin gh-pages"
184
- end
185
- end
186
- end
187
-
188
- require 'rake/testtask'
189
-
190
- Rake::TestTask.new do |t|
191
- t.libs = ["lib", "test"]
192
- t.libs << "test/integration" if ENV['NET_SSH_RUN_INTEGRATION_TESTS']
193
- t.libs << "test/win_integration" if ENV['NET_SSH_RUN_WIN_INTEGRATION_TESTS']
194
- test_files = FileList['test/**/test_*.rb']
195
- test_files -= FileList['test/integration/**/test_*.rb'] unless ENV['NET_SSH_RUN_INTEGRATION_TESTS']
196
- test_files -= FileList['test/win_integration/**/test_*.rb'] unless ENV['NET_SSH_RUN_WIN_INTEGRATION_TESTS']
197
- test_files -= FileList['test/manual/test_*.rb']
198
- test_files -= FileList['test/test_pageant.rb']
199
- test_files -= FileList['test/test/**/test_*.rb']
200
- t.test_files = test_files
201
- end
202
-
203
- # We need to enable the OpenSSL 3.0 legacy providers for our test suite
204
- require 'openssl'
205
- ENV['OPENSSL_CONF'] = 'test/openssl3.conf' if OpenSSL::OPENSSL_LIBRARY_VERSION.start_with? "OpenSSL 3"
206
-
207
- desc "Run tests of Net::SSH:Test"
208
- Rake::TestTask.new do |t|
209
- t.name = "test_test"
210
- # we need to run test/test separatedly as it hacks io + other modules
211
- t.libs = ["lib", "test"]
212
- test_files = FileList['test/test/**/test_*.rb']
213
- t.test_files = test_files
214
- end
data/SECURITY.md DELETED
@@ -1,4 +0,0 @@
1
- ## Security contact information
2
-
3
- To report a security vulnerability, please use the
4
- [GitHub private vulnerability reporting feature](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability).
data/THANKS.txt DELETED
@@ -1,110 +0,0 @@
1
- Net::SSH was originally written by Jamis Buck <jamis@37signals.com>. It
2
- is currently maintained by Delano Mandelbaum <delano@solutious.com>. In
3
- addition, the following individuals are gratefully acknowledged for their
4
- contributions:
5
-
6
- GOTOU Yuuzou <gotoyuzo@notwork.org>
7
- * help and code related to OpenSSL
8
-
9
- Guillaume Marçais <guillaume.marcais@free.fr>
10
- * support for communicating with the the PuTTY "pageant" process
11
-
12
- Daniel Berger <djberg96@yahoo.com>
13
- * help getting unit tests in earlier Net::SSH versions to pass in Windows
14
- * initial version of Net::SSH::Config provided inspiration and encouragement
15
-
16
- Chris Andrews <chris@nodnol.org> and Lee Jensen <lee@outerim.com>
17
- * support for ssh agent forwarding
18
-
19
- Hiroshi Nakamura
20
- * fixed errors with JRuby tests
21
-
22
- bobveznat
23
- therealjessesanford
24
- liggitt
25
- jarredholman
26
- yugui
27
- SFEley
28
- bobtfish
29
- carlhoerberg
30
- deric
31
- mirakui
32
- ecki
33
- Dave Sieh
34
- metametaclass
35
- fnordfish
36
- krishicks
37
- noric
38
- GabKlein
39
- Josh Kalderimis
40
- voxik
41
- Olipro
42
- jansegre
43
- priteau
44
- jordimassaguerpla
45
- Kenichi Kamiya
46
- Andreas Wolff
47
- mhuffnagle
48
- ohrite
49
- iltempo
50
- nagachika
51
- Nobuhiro IMAI
52
- arturaz
53
- dubspeed
54
- Andy Brody
55
- Marco Sandrini
56
- Ryosuke Yamazaki
57
- muffl0n
58
- pcn
59
- musybite
60
- Mark Imbriaco
61
- Joel Watson
62
- Woon Jung
63
- Edmund Haselwanter
64
- robbebob
65
- Daniel Pittman
66
- Markus Roberts
67
- Gavin Brock
68
- Rich Lane
69
- Lee Marlow
70
- xbaldauf
71
- Delano Mandelbaum
72
- Miklós Fazekas
73
- Andy Lo-A-Foe
74
- Jason Weathered
75
- Hans de Graaff
76
- Travis Reeder
77
- Akinori MUSHA
78
- Alex Peuchert
79
- Daniel Azuma
80
- Will Bryant
81
- Gerald Talton
82
- ckoehler
83
- Karl Varga
84
- Denis Bernard
85
- Steven Hazel
86
- Alex Holems
87
- Andrew Babkin
88
- Bob Cotton
89
- Yanko Ivanov
90
- Angel N. Sciortino
91
- arilerner@mac.com
92
- David Dollar
93
- Timo Gatsonides
94
- Matthew Todd
95
- Brian Candler
96
- Francis Sullivan
97
- James Rosen
98
- Mike Timm
99
- guns
100
- devrandom
101
- kachick
102
- Pablo Merino
103
- thedarkone
104
- czarneckid
105
- jbarnette
106
- watsonian
107
- Grant Hutchins
108
- Michael Schubert
109
- mtrudel
110
- Aurélien Derouineau