Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed pageant support. #140

Merged
merged 1 commit into from Jan 16, 2014
Merged

Fixed pageant support. #140

merged 1 commit into from Jan 16, 2014

Conversation

jarredholman
Copy link
Contributor

Fixed pageant agent forwarding support.

Uses a simpler channel interface since it's not a real socket.

@delano
Copy link
Collaborator

delano commented Jan 15, 2014

Thanks for the pull request. Can you give an example of the usecase it fixes?

@jarredholman
Copy link
Contributor Author

Pageant currently works for authentication but is broken if you try to use it for agent forwarding.

It fixes the same thing as #66 just in a better way.
Instead of trying to make it more like a socket, I just don't treat it like a real one.

I was using this testcase:

require 'net/ssh'

Net::SSH.start('10.1.248.236', 'jholman', :forward_agent => true) do |ssh|
  puts 'hostname ' + ssh.exec!('hostname')
  puts ssh.exec!('ssh-add -l')
end

With net-ssh master you get this output:

hostname jh-arch
C:/dev/rubydev/winssh/net-ssh/lib/net/ssh/ruby_compat.rb:30:in `select': can't convert Net::SSH::Authentication::Pageant::Socket19 into IO (TypeError)
    from C:/dev/rubydev/winssh/net-ssh/lib/net/ssh/ruby_compat.rb:30:in `io_select'

@jarredholman
Copy link
Contributor Author

It also fixes #55

delano added a commit that referenced this pull request Jan 16, 2014
@delano delano merged commit bd61eea into net-ssh:master Jan 16, 2014
@delano
Copy link
Collaborator

delano commented Jan 16, 2014

Awesome, thanks. It also passes all the tests on Ruby 1.9 and 2.0 (#66 did neither).

I'll pull it in and create a release soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants