summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt7
-rw-r--r--lib/net/ssh/config.rb17
-rw-r--r--lib/net/ssh/version.rb2
-rw-r--r--net-ssh.gemspec4
4 files changed, 18 insertions, 12 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 97c426d..ae17f5f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,11 @@
+=== 2.8.1 / 19 Feb 2014
+
+* Correct location of global known_hosts files [mfischer-zd]
+* Fix for password authentication [blackpond, zachlipton, delano]
+
+
=== 2.8.0 / 01 Feb 2014
* Handle ssh-rsa and ssh-dss certificate files [bobveznat]
@@ -17,6 +23,7 @@
* Allow KeyManager to recover from incompatible agents [ecki, delano]
* Fix for "Authentication Method determination can pick up a class from the root namespace" [dave.sieh]
+
=== 2.7.0 / 11 Sep 2013
* Fix for 'Could not parse PKey: no start line' error on private keys with passphrases (issue #101) [metametaclass]
diff --git a/lib/net/ssh/config.rb b/lib/net/ssh/config.rb
index fab681b..4798344 100644
--- a/lib/net/ssh/config.rb
+++ b/lib/net/ssh/config.rb
@@ -48,7 +48,7 @@ module Net; module SSH
def default_files
@@default_files
end
-
+
def default_auth_methods
@@default_auth_methods
end
@@ -58,7 +58,7 @@ module Net; module SSH
# #default_files), translates the resulting hash into the options
# recognized by Net::SSH, and returns them.
def for(host, files=default_files)
- hash = translate(files.inject({}) { |settings, file|
+ hash = translate(files.inject({}) { |settings, file|
load(file, host, settings)
})
end
@@ -74,14 +74,14 @@ module Net; module SSH
return settings unless File.readable?(file)
settings[:auth_methods] ||= default_auth_methods.clone
-
+
globals = {}
matched_host = nil
multi_host = []
seen_host = false
IO.foreach(file) do |line|
next if line =~ /^\s*(?:#.*)?$/
-
+
if line =~ /^\s*(\S+)\s*=(.*)$/
key, value = $1, $2
else
@@ -93,14 +93,14 @@ module Net; module SSH
key.downcase!
value = $1 if value =~ /^"(.*)"$/
-
+
value = case value.strip
when /^\d+$/ then value.to_i
when /^no$/i then false
when /^yes$/i then true
else value
end
-
+
if key == 'host'
# Support "Host host1 host2 hostN".
# See http://github.com/net-ssh/net-ssh/issues#issue/6
@@ -122,9 +122,9 @@ module Net; module SSH
end
end
end
-
+
settings = globals.merge(settings) if globals
-
+
return settings
end
@@ -134,7 +134,6 @@ module Net; module SSH
# the returned hash will have Symbols for keys.
def translate(settings)
settings.inject({}) do |hash, (key, value)|
- hash[:auth_methods] ||= settings[:auth_methods] || default_auth_methods.clone
case key
when 'bindaddress' then
hash[:bind_address] = value
diff --git a/lib/net/ssh/version.rb b/lib/net/ssh/version.rb
index 893d710..006329c 100644
--- a/lib/net/ssh/version.rb
+++ b/lib/net/ssh/version.rb
@@ -51,7 +51,7 @@ module Net; module SSH
MINOR = 8
# The tiny component of this version of the Net::SSH library
- TINY = 0
+ TINY = 1
# The current version of the Net::SSH library as a Version instance
CURRENT = new(MAJOR, MINOR, TINY)
diff --git a/net-ssh.gemspec b/net-ssh.gemspec
index 09cddd5..6858cab 100644
--- a/net-ssh.gemspec
+++ b/net-ssh.gemspec
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = "net-ssh"
- s.version = "2.8.0"
+ s.version = "2.8.1"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Jamis Buck", "Delano Mandelbaum"]
- s.date = "2014-02-01"
+ s.date = "2014-02-19"
s.description = "Net::SSH: a pure-Ruby implementation of the SSH2 client protocol. It allows you to write programs that invoke and interact with processes on remote servers, via SSH2."
s.email = "net-ssh@solutious.com"
s.extra_rdoc_files = [