I'm just getting started with Chef and have a few nodes in a private network that I need to first ssh into a gateway node to gain access to. For the moment i'm using purely password based authentication on both the gateway and the destination node.

CLIENT>      $ ssh GATEWAY

When running the command knife bootstrap destination.node --ssh-gateway="gateway.node" where *.node is replaced with the full domain of the host. I get prompted for a password but am unable to gain access.

Bootstrapping Chef on destination.node
Failed to authenticate %USER% - trying password auth
Enter your password: 
ERROR: Net::SSH::AuthenticationFailed: %USER%

Perhaps i'm not quite understanding the correct usage of the knife gateway options? I have also tried supplying the --ssh-user and --ssh-password options with no luck.

  • I'm having the same issue, did you manage to solve it? – Victor Pudeyev Sep 19 '14 at 8:08

Try "yourusername@gateway.node", it will prompt for the password

Looking very briefly at the code in chef I did not see a way to pass in gateway password info. I would set up key-based access between your host and the gateway, anyway, only takes a minute and saves typing.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.