ruby-net-ssh 1.1.1

pure-ruby implementation of the SSH2 client protocol
This commit is contained in:
jcs 2007-05-31 03:45:51 +00:00
parent e67f0672c7
commit 81bfc94dbb
5 changed files with 1537 additions and 0 deletions

26
net/ruby-net-ssh/Makefile Normal file
View File

@ -0,0 +1,26 @@
# $OpenBSD: Makefile,v 1.1.1.1 2007/05/31 03:45:51 jcs Exp $
COMMENT= "pure-ruby implementation of the SSH2 client protocol"
DISTNAME= net-ssh-1.1.1
PKGNAME= ruby-${DISTNAME}
CATEGORIES= net
# bsd/ruby
PERMIT_PACKAGE_CDROM= yes
PERMIT_PACKAGE_FTP= yes
PERMIT_DISTFILES_CDROM= yes
PERMIT_DISTFILES_FTP= yes
MASTER_SITES= http://rubyforge.org/frs/download.php/20539/
MODULES= lang/ruby
BUILD_DEPENDS= ${RUN_DEPENDS}
RUN_DEPENDS= :ruby-needle-1.3.0:devel/ruby-needle
CONFIGURE_STYLE=ruby gem
PKG_ARCH= *
.include <bsd.port.mk>

View File

@ -0,0 +1,5 @@
MD5 (net-ssh-1.1.1.gem) = 4XT9YPEoIONQOIkYWVNQpg==
RMD160 (net-ssh-1.1.1.gem) = cOgYF0Ouniezga+WVjCvVLzJSbQ=
SHA1 (net-ssh-1.1.1.gem) = FRr5TE9SEk0hq0UZhTg+s3vBBAw=
SHA256 (net-ssh-1.1.1.gem) = AdH7KHSgSNJ44qgLt73WwcZkQ6kE8U1BcJ8Yo7sIFR8=
SIZE (net-ssh-1.1.1.gem) = 157184

View File

@ -0,0 +1,46 @@
# grok empty or commented ssh_known_hosts lines, and handle different key types
$OpenBSD: patch-lib_net_ssh_host-key-verifier_rb,v 1.1.1.1 2007/05/31 03:45:52 jcs Exp $
--- lib/net/ssh/host-key-verifier.rb.orig Wed Dec 31 17:00:00 1969
+++ lib/net/ssh/host-key-verifier.rb Wed May 30 21:36:49 2007
@@ -10,10 +10,12 @@ module Net
host = item[:host] || arguments[:peer][:host]
ip = item[:ip] || arguments[:peer][:ip]
port = item[:port] || arguments[:peer][:port]
+ type = item[:type] || arguments[:peer][:type]
host == arguments[:peer][:host] &&
ip == arguments[:peer][:ip] &&
- port == arguments[:peer][:port]
+ port == arguments[:peer][:port] &&
+ type == arguments[:key].ssh_type
end
# we've never seen this host before, so just automatically add the key.
@@ -84,7 +86,10 @@ module Net
end
def load_keys_from(path)
- File.readlines(path).map do |line|
+ keys = []
+ File.readlines(path).each do |line|
+ next if line.chomp.empty? || line =~ /^#/
+
host, type, key = line.chomp.split
host, address = host.split(/,/)
@@ -99,10 +104,11 @@ module Net
key = key.unpack("m*").first
- { :host => host, :ip => address, :port => port, :type => type, :key => key }
+ keys.push({ :host => host, :ip => address, :port => port, :type => type, :key => key })
end
+ keys
end
end
end
-end
\ No newline at end of file
+end

View File

@ -0,0 +1,9 @@
Net::SSH is a pure-Ruby implementation of the SSH2 client protocol.
It supports the following features:
- User authentication via explicit username/password, or using a
public-key/private-key pair.
- Port forwarding, both from the local host to a remote computer via
the remote host, and from the remote host to the local host.
- Execute processes on the remote machine, both interactively and
non-interactively (batch).

1451
net/ruby-net-ssh/pkg/PLIST Normal file

File diff suppressed because it is too large Load Diff