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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGES.txt +106 -5
- data/README.md +71 -57
- data/lib/net/ssh/authentication/agent.rb +35 -11
- data/lib/net/ssh/authentication/certificate.rb +2 -2
- data/lib/net/ssh/authentication/ed25519.rb +137 -44
- data/lib/net/ssh/authentication/ed25519_loader.rb +14 -9
- data/lib/net/ssh/authentication/key_manager.rb +22 -11
- data/lib/net/ssh/authentication/methods/abstract.rb +6 -8
- data/lib/net/ssh/authentication/methods/hostbased.rb +3 -3
- data/lib/net/ssh/authentication/methods/publickey.rb +52 -38
- data/lib/net/ssh/authentication/security_key.rb +71 -0
- data/lib/net/ssh/authentication/session.rb +30 -17
- data/lib/net/ssh/buffer.rb +8 -3
- data/lib/net/ssh/buffered_io.rb +40 -3
- data/lib/net/ssh/config.rb +123 -50
- data/lib/net/ssh/connection/channel.rb +49 -2
- data/lib/net/ssh/connection/session.rb +151 -13
- data/lib/net/ssh/errors.rb +34 -6
- data/lib/net/ssh/key_factory.rb +7 -1
- data/lib/net/ssh/known_hosts.rb +103 -38
- data/lib/net/ssh/multiplex/client.rb +162 -0
- data/lib/net/ssh/multiplex/control_path.rb +120 -0
- data/lib/net/ssh/multiplex/proxy_transport.rb +218 -0
- data/lib/net/ssh/multiplex.rb +127 -0
- data/lib/net/ssh/prompt.rb +43 -5
- data/lib/net/ssh/proxy/https.rb +28 -4
- data/lib/net/ssh/proxy/jump.rb +61 -8
- data/lib/net/ssh/service/forward.rb +35 -24
- data/lib/net/ssh/test.rb +2 -1
- data/lib/net/ssh/transport/algorithms.rb +92 -34
- data/lib/net/ssh/transport/chacha20_poly1305_cipher.rb +89 -16
- data/lib/net/ssh/transport/chacha20_poly1305_cipher_loader.rb +20 -1
- data/lib/net/ssh/transport/cipher_factory.rb +23 -1
- data/lib/net/ssh/transport/constants.rb +1 -0
- data/lib/net/ssh/transport/gcm_cipher.rb +27 -6
- data/lib/net/ssh/transport/hmac/sha1_etm.rb +12 -0
- data/lib/net/ssh/transport/hmac.rb +2 -0
- data/lib/net/ssh/transport/kex/curve25519_sha256.rb +41 -9
- data/lib/net/ssh/transport/kex/curve25519_sha256_loader.rb +14 -6
- data/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb +8 -0
- data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb +45 -15
- data/lib/net/ssh/transport/openssl.rb +2 -1
- data/lib/net/ssh/transport/packet_stream.rb +12 -0
- data/lib/net/ssh/transport/session.rb +61 -45
- data/lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb +3 -1
- data/lib/net/ssh/verifiers/always.rb +16 -4
- data/lib/net/ssh/verifiers/never.rb +2 -1
- data/lib/net/ssh/version.rb +3 -3
- data/lib/net/ssh.rb +164 -63
- data.tar.gz.sig +0 -0
- metadata +33 -61
- metadata.gz.sig +0 -0
- data/.dockerignore +0 -9
- data/.github/FUNDING.yml +0 -1
- data/.github/config/rubocop_linter_action.yml +0 -4
- data/.github/workflows/ci-with-docker.yml +0 -58
- data/.github/workflows/ci.yml +0 -99
- data/.github/workflows/rubocop.yml +0 -16
- data/.gitignore +0 -15
- data/.rubocop.yml +0 -22
- data/.rubocop_todo.yml +0 -1083
- data/DEVELOPMENT.md +0 -23
- data/Dockerfile +0 -32
- data/Dockerfile.openssl3 +0 -17
- data/Dockerfile.zlib_ng +0 -29
- data/Gemfile +0 -13
- data/Gemfile.noed25519 +0 -12
- data/Gemfile.norbnacl +0 -12
- data/ISSUE_TEMPLATE.md +0 -30
- data/Manifest +0 -132
- data/Rakefile +0 -196
- data/SECURITY.md +0 -4
- data/THANKS.txt +0 -110
- data/appveyor.yml +0 -58
- data/docker-compose.yml +0 -23
- data/net-ssh-public_cert.pem +0 -21
- data/net-ssh.gemspec +0 -48
- data/support/ssh_tunnel_bug.rb +0 -65
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.6 to 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|; s|security.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 && NET_SSH_NO_ED25519=1 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 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 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,13 +0,0 @@
|
|
|
1
|
-
source 'https://rubygems.org'
|
|
2
|
-
|
|
3
|
-
# Specify your gem's dependencies in mygem.gemspec
|
|
4
|
-
gemspec
|
|
5
|
-
|
|
6
|
-
gem 'byebug', group: %i[development test] if !Gem.win_platform? && RUBY_ENGINE == "ruby"
|
|
7
|
-
|
|
8
|
-
if ENV["CI"]
|
|
9
|
-
gem 'codecov', require: false, group: :test
|
|
10
|
-
gem 'simplecov', require: false, group: :test
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
gem 'webrick', group: %i[development test] if RUBY_VERSION.split(".")[0].to_i >= 3
|
data/Gemfile.noed25519
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
source 'https://rubygems.org'
|
|
2
|
-
|
|
3
|
-
ENV['NET_SSH_NO_ED25519'] = 'true'
|
|
4
|
-
# Specify your gem's dependencies in mygem.gemspec
|
|
5
|
-
gemspec
|
|
6
|
-
|
|
7
|
-
if ENV["CI"] && !Gem.win_platform?
|
|
8
|
-
gem 'simplecov', require: false, group: :test
|
|
9
|
-
gem 'codecov', require: false, group: :test
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
gem 'webrick', group: %i[development test] if RUBY_VERSION.split(".")[0].to_i >= 3
|
data/Gemfile.norbnacl
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
source 'https://rubygems.org'
|
|
2
|
-
|
|
3
|
-
ENV['NET_SSH_NO_RBNACL'] = 'true'
|
|
4
|
-
# Specify your gem's dependencies in mygem.gemspec
|
|
5
|
-
gemspec
|
|
6
|
-
|
|
7
|
-
if ENV["CI"] && !Gem.win_platform?
|
|
8
|
-
gem 'simplecov', require: false, group: :test
|
|
9
|
-
gem 'codecov', require: false, group: :test
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
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,196 +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
|
-
require "rdoc/task"
|
|
13
|
-
|
|
14
|
-
desc "When releasing make sure NET_SSH_BUILDGEM_SIGNED is set"
|
|
15
|
-
task :check_NET_SSH_BUILDGEM_SIGNED do
|
|
16
|
-
raise "NET_SSH_BUILDGEM_SIGNED should be set to release" unless ENV['NET_SSH_BUILDGEM_SIGNED']
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
Rake::Task[:release].enhance [:check_NET_SSH_BUILDGEM_SIGNED]
|
|
20
|
-
Rake::Task[:release].prerequisites.unshift(:check_NET_SSH_BUILDGEM_SIGNED)
|
|
21
|
-
|
|
22
|
-
task default: ["build"]
|
|
23
|
-
CLEAN.include ['pkg', 'rdoc']
|
|
24
|
-
name = "net-ssh"
|
|
25
|
-
|
|
26
|
-
require_relative "lib/net/ssh/version"
|
|
27
|
-
version = Net::SSH::Version::CURRENT
|
|
28
|
-
|
|
29
|
-
extra_files = %w[LICENSE.txt THANKS.txt CHANGES.txt]
|
|
30
|
-
RDoc::Task.new do |rdoc|
|
|
31
|
-
rdoc.rdoc_dir = "rdoc"
|
|
32
|
-
rdoc.title = "#{name} #{version}"
|
|
33
|
-
rdoc.generator = 'hanna' # gem install hanna-nouveau
|
|
34
|
-
rdoc.main = 'README.md'
|
|
35
|
-
rdoc.rdoc_files.include("README*")
|
|
36
|
-
rdoc.rdoc_files.include("bin/*.rb")
|
|
37
|
-
rdoc.rdoc_files.include("lib/**/*.rb")
|
|
38
|
-
extra_files.each { |file|
|
|
39
|
-
rdoc.rdoc_files.include(file) if File.exist?(file)
|
|
40
|
-
}
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
namespace :cert do
|
|
44
|
-
desc "Update public cert from private - only run if public is expired"
|
|
45
|
-
task :update_public_when_expired do
|
|
46
|
-
require 'openssl'
|
|
47
|
-
require 'time'
|
|
48
|
-
raw = File.read "net-ssh-public_cert.pem"
|
|
49
|
-
certificate = OpenSSL::X509::Certificate.new raw
|
|
50
|
-
raise Exception, "Not yet expired: #{certificate.not_after}" unless certificate.not_after < Time.now
|
|
51
|
-
|
|
52
|
-
sh "gem cert --build netssh@solutious.com --days 365*5 --private-key /mnt/gem/net-ssh-private_key.pem"
|
|
53
|
-
sh "mv gem-public_cert.pem net-ssh-public_cert.pem"
|
|
54
|
-
sh "gem cert --add net-ssh-public_cert.pem"
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
def change_version(&block)
|
|
59
|
-
version_file = 'lib/net/ssh/version.rb'
|
|
60
|
-
require_relative version_file
|
|
61
|
-
pre = Net::SSH::Version::PRE
|
|
62
|
-
tiny = Net::SSH::Version::TINY
|
|
63
|
-
result = block[pre: pre, tiny: Net::SSH::Version::TINY]
|
|
64
|
-
raise ArgumentError, "Version change logic should always return a pre" unless result.key?(:pre)
|
|
65
|
-
|
|
66
|
-
new_pre = result[:pre]
|
|
67
|
-
new_tiny = result[:tiny] || tiny
|
|
68
|
-
found = { pre: false, tiny: false }
|
|
69
|
-
File.open("#{version_file}.new", "w") do |f|
|
|
70
|
-
File.readlines(version_file).each do |line|
|
|
71
|
-
match =
|
|
72
|
-
if pre.nil?
|
|
73
|
-
/^(\s+PRE\s+=\s+)nil(\s*)$/.match(line)
|
|
74
|
-
else
|
|
75
|
-
/^(\s+PRE\s+=\s+")#{pre}("\s*)$/.match(line)
|
|
76
|
-
end
|
|
77
|
-
if match
|
|
78
|
-
prefix = match[1]
|
|
79
|
-
postfix = match[2]
|
|
80
|
-
prefix.delete_suffix!('"')
|
|
81
|
-
postfix.delete_prefix!('"')
|
|
82
|
-
new_line = "#{prefix}#{new_pre.inspect}#{postfix}"
|
|
83
|
-
puts "Changing:\n - #{line} + #{new_line}"
|
|
84
|
-
line = new_line
|
|
85
|
-
found[:pre] = true
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
if new_tiny != tiny
|
|
89
|
-
match = /^(\s+TINY\s+=\s+)#{tiny}(\s*)$/.match(line)
|
|
90
|
-
if match
|
|
91
|
-
prefix = match[1]
|
|
92
|
-
postfix = match[2]
|
|
93
|
-
new_line = "#{prefix}#{new_tiny}#{postfix}"
|
|
94
|
-
puts "Changing:\n - #{line} + #{new_line}"
|
|
95
|
-
line = new_line
|
|
96
|
-
found[:tiny] = true
|
|
97
|
-
end
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
f.write(line)
|
|
101
|
-
end
|
|
102
|
-
raise ArgumentError, "Cound not find line: PRE = \"#{pre}\" in #{version_file}" unless found[:pre]
|
|
103
|
-
raise ArgumentError, "Cound not find line: TINY = \"#{tiny}\" in #{version_file}" unless found[:tiny] || new_tiny == tiny
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
FileUtils.mv version_file, "#{version_file}.old"
|
|
107
|
-
FileUtils.mv "#{version_file}.new", version_file
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
namespace :vbump do
|
|
111
|
-
desc "Final release"
|
|
112
|
-
task :final do
|
|
113
|
-
change_version do |pre:, tiny:|
|
|
114
|
-
_ = tiny
|
|
115
|
-
if pre.nil?
|
|
116
|
-
{ tiny: tiny + 1, pre: nil }
|
|
117
|
-
else
|
|
118
|
-
raise ArgumentError, "Unexpected pre: #{pre}" if pre.nil?
|
|
119
|
-
|
|
120
|
-
{ pre: nil }
|
|
121
|
-
end
|
|
122
|
-
end
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
desc "Increment prerelease"
|
|
126
|
-
task :pre, [:type] do |_t, args|
|
|
127
|
-
change_version do |pre:, tiny:|
|
|
128
|
-
puts " PRE => #{pre.inspect}"
|
|
129
|
-
match = /^([a-z]+)(\d+)/.match(pre)
|
|
130
|
-
raise ArgumentError, "Unexpected pre: #{pre}" if match.nil? && args[:type].nil?
|
|
131
|
-
|
|
132
|
-
if match.nil? || (!args[:type].nil? && args[:type] != match[1])
|
|
133
|
-
if pre.nil?
|
|
134
|
-
{ pre: "#{args[:type]}1", tiny: tiny + 1 }
|
|
135
|
-
else
|
|
136
|
-
{ pre: "#{args[:type]}1" }
|
|
137
|
-
end
|
|
138
|
-
else
|
|
139
|
-
{ pre: "#{match[1]}#{match[2].to_i + 1}" }
|
|
140
|
-
end
|
|
141
|
-
end
|
|
142
|
-
end
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
namespace :rdoc do
|
|
146
|
-
desc "Update gh-pages branch"
|
|
147
|
-
task :publish do
|
|
148
|
-
# copy/checkout
|
|
149
|
-
rm_rf "/tmp/net-ssh-rdoc"
|
|
150
|
-
rm_rf "/tmp/net-ssh-gh-pages"
|
|
151
|
-
cp_r "./rdoc", "/tmp/net-ssh-rdoc"
|
|
152
|
-
mkdir "/tmp/net-ssh-gh-pages"
|
|
153
|
-
Dir.chdir "/tmp/net-ssh-gh-pages" do
|
|
154
|
-
sh "git clone --branch gh-pages --single-branch https://github.com/net-ssh/net-ssh"
|
|
155
|
-
rm_rf "/tmp/net-ssh-gh-pages/net-ssh/*"
|
|
156
|
-
end
|
|
157
|
-
# update
|
|
158
|
-
sh "cp -rf ./rdoc/* /tmp/net-ssh-gh-pages/net-ssh/"
|
|
159
|
-
Dir.chdir "/tmp/net-ssh-gh-pages/net-ssh" do
|
|
160
|
-
sh "git add -A ."
|
|
161
|
-
sh "git commit -m \"Update docs\""
|
|
162
|
-
end
|
|
163
|
-
# publish
|
|
164
|
-
Dir.chdir "/tmp/net-ssh-gh-pages/net-ssh" do
|
|
165
|
-
sh "git push origin gh-pages"
|
|
166
|
-
end
|
|
167
|
-
end
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
require 'rake/testtask'
|
|
171
|
-
|
|
172
|
-
Rake::TestTask.new do |t|
|
|
173
|
-
t.libs = ["lib", "test"]
|
|
174
|
-
t.libs << "test/integration" if ENV['NET_SSH_RUN_INTEGRATION_TESTS']
|
|
175
|
-
t.libs << "test/win_integration" if ENV['NET_SSH_RUN_WIN_INTEGRATION_TESTS']
|
|
176
|
-
test_files = FileList['test/**/test_*.rb']
|
|
177
|
-
test_files -= FileList['test/integration/**/test_*.rb'] unless ENV['NET_SSH_RUN_INTEGRATION_TESTS']
|
|
178
|
-
test_files -= FileList['test/win_integration/**/test_*.rb'] unless ENV['NET_SSH_RUN_WIN_INTEGRATION_TESTS']
|
|
179
|
-
test_files -= FileList['test/manual/test_*.rb']
|
|
180
|
-
test_files -= FileList['test/test_pageant.rb']
|
|
181
|
-
test_files -= FileList['test/test/**/test_*.rb']
|
|
182
|
-
t.test_files = test_files
|
|
183
|
-
end
|
|
184
|
-
|
|
185
|
-
# We need to enable the OpenSSL 3.0 legacy providers for our test suite
|
|
186
|
-
require 'openssl'
|
|
187
|
-
ENV['OPENSSL_CONF'] = 'test/openssl3.conf' if OpenSSL::OPENSSL_LIBRARY_VERSION.start_with? "OpenSSL 3"
|
|
188
|
-
|
|
189
|
-
desc "Run tests of Net::SSH:Test"
|
|
190
|
-
Rake::TestTask.new do |t|
|
|
191
|
-
t.name = "test_test"
|
|
192
|
-
# we need to run test/test separatedly as it hacks io + other modules
|
|
193
|
-
t.libs = ["lib", "test"]
|
|
194
|
-
test_files = FileList['test/test/**/test_*.rb']
|
|
195
|
-
t.test_files = test_files
|
|
196
|
-
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
|
data/appveyor.yml
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
version: '{build}'
|
|
2
|
-
|
|
3
|
-
skip_tags: true
|
|
4
|
-
|
|
5
|
-
environment:
|
|
6
|
-
matrix:
|
|
7
|
-
- ruby_version: "jruby-9.1.2.0"
|
|
8
|
-
- ruby_version: "26-x64"
|
|
9
|
-
- ruby_version: "25-x64"
|
|
10
|
-
- ruby_version: "24-x64"
|
|
11
|
-
- ruby_version: "23"
|
|
12
|
-
- ruby_version: "23-x64"
|
|
13
|
-
|
|
14
|
-
matrix:
|
|
15
|
-
allow_failures:
|
|
16
|
-
- ruby_version: "jruby-9.1.2.0"
|
|
17
|
-
|
|
18
|
-
#init:
|
|
19
|
-
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
|
20
|
-
|
|
21
|
-
#on_finish:
|
|
22
|
-
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
platform:
|
|
26
|
-
- x86
|
|
27
|
-
|
|
28
|
-
install:
|
|
29
|
-
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
|
|
30
|
-
- if "%ruby_version%" == "jruby-9.1.2.0" ( cinst javaruntime -i )
|
|
31
|
-
- if "%ruby_version%" == "jruby-9.1.2.0" ( cinst jruby --version 9.1.2.0 -i --allow-empty-checksums )
|
|
32
|
-
- if "%ruby_version%" == "jruby-9.1.2.0" ( SET "PATH=C:\jruby-9.1.2.0\bin\;%PATH%" )
|
|
33
|
-
- ruby --version
|
|
34
|
-
- gem install bundler --no-document --user-install -v 1.17
|
|
35
|
-
- SET BUNDLE_GEMFILE=Gemfile.noed25519
|
|
36
|
-
- bundle install --retry=3
|
|
37
|
-
- cinst freesshd
|
|
38
|
-
- cinst putty --allow-empty-checksums
|
|
39
|
-
- ps: |
|
|
40
|
-
if ($env:Processor_Architecture -eq "x86")
|
|
41
|
-
{
|
|
42
|
-
dir 'C:\Program Files\'
|
|
43
|
-
dir 'C:\Program Files\freeSSHd'
|
|
44
|
-
cp 'test\win_integration\FreeSSHDService.ini' 'C:\Program Files\freeSSHd\FreeSSHDService.ini'
|
|
45
|
-
& 'C:\Program Files\freeSSHd\FreeSSHDService.exe'
|
|
46
|
-
} else {
|
|
47
|
-
dir 'C:\Program Files (x86)\'
|
|
48
|
-
dir 'C:\Program Files (x86)\freeSSHd'
|
|
49
|
-
cp 'test\win_integration\FreeSSHDService32.ini' 'C:\Program Files (x86)\freeSSHd\FreeSSHDService.ini'
|
|
50
|
-
& 'C:\Program Files (x86)\freeSSHd\FreeSSHDService.exe'
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
test_script:
|
|
54
|
-
- SET BUNDLE_GEMFILE=Gemfile.noed25519
|
|
55
|
-
- SET NET_SSH_RUN_WIN_INTEGRATION_TESTS=YES
|
|
56
|
-
- bundle exec rake test
|
|
57
|
-
|
|
58
|
-
build: off
|