0

Per Chef's documentation, the -p (or --ssh-port) flag should allow me to specify an SSH port, however, the following:

knife bootstrap host.com -x user -P password --ssh-port 5846 -N nodename --sudo

returns:

-bash: --ssh-port: command not found

before attempting to connect to port 22. The same is true of "-p". Has anyone come across this, or perhaps caught what I might be doing wrong?

I am running Chef 11.14.6:

$ knife -v
Chef: 11.14.6
1

If the password contains special characters, like ; it might trick the shell into believing the command has ended and a new one started. Try to put the password in quotes, or even better, don't put it into the command but let the system ask for it.

  • I didn't think of that; the password used an ampersand, it turned out. – tony_perkis666 Sep 3 '14 at 18:07

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.