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
0

1 Answer 1

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .