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

Interactive usage #24

Closed
wdavidw opened this issue Jan 31, 2013 · 2 comments
Closed

Interactive usage #24

wdavidw opened this issue Jan 31, 2013 · 2 comments

Comments

@wdavidw
Copy link
Contributor

wdavidw commented Jan 31, 2013

Hi,

Could you provide some guidance on the usage of the "tryKeyboard" option and the "keyboard-interactive" event.

c = new Connection()
c.on 'ready', ->
  console.log 'Connection :: ready'
c.on 'keyboard-interactive', (name, instructions, instructionsLang, prompts, finish) ->
  console.log '>>', name, instructions, instructionsLang, prompts
c.connect 
  host: hostname
  username: username
  tryKeyboard: true

Thanks,
d.

@mscdex
Copy link
Owner

mscdex commented Jan 31, 2013

If you set tryKeyboard to true and no other authentication mechanism works out and the server supports keyboard-interactive authentication, then the server sends a series prompts for the client to answer. The answers to these prompts (stored in an array in the same order as the prompts) are then passed to the given callback (finish). If the server says the answers check out, then you're authenticated and 'ready' is emitted. Otherwise it can either flat out deny you or ask you to answer some more prompts.

@wdavidw
Copy link
Contributor Author

wdavidw commented Jan 31, 2013

Thanks, now i get it, my redhat enterprise doesn't seem to accept interactive mode, worked on osx

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

No branches or pull requests

2 participants