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
EEAA
  • 109,363
  • 18
  • 175
  • 245
tony_perkis666
  • 243
  • 2
  • 12

1 Answers1

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.

Sven
  • 98,649
  • 14
  • 180
  • 226