Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ appear at the top.

* Add your entries below here, remember to credit yourself however you want
to be credited!
* Fixed compatibility with net-ssh > 3.1.0. @byroot
[#357](https://github.com/capistrano/sshkit/issues/357)

## [1.11.0][] (2016-06-14)

Expand Down
10 changes: 8 additions & 2 deletions lib/sshkit/backends/netssh.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,14 @@ def ssh_options

private

def default_options
@default_options ||= {known_hosts: SSHKit::Backend::Netssh::KnownHosts.new}
if Net::SSH::VALID_OPTIONS.include?(:known_hosts)
def default_options
@default_options ||= {known_hosts: SSHKit::Backend::Netssh::KnownHosts.new}
end
else
def default_options
@default_options ||= {}
end
end
end

Expand Down