This is not uncommon for boot servers using an account other than root. As @StephenKing noted, the knife supports this. The following is my usual procedure:
ssh-copy-id me@hostname
knife bootstrap hostname --ssh-user me --sudo --run-list role[desired_server_role]
However, this answer assumes that you are using a chef server (highly recommended) ....
, . , sudo "kno solo prepare" :
SSH ~/.ssh/config , -F. (-p), (-i) (-P). sudo , .
"knot solo bootstrap", , .
$ knife solo bootstrap -h
knife solo bootstrap [USER@]HOSTNAME [JSON] (options)
-N,
-k,
-c,
-d,
-e,
-E,
-i,
-j JSON_ATTRIBS, A JSON string to be added to node config (if it does not exist)
-z,
-u,
-r,
-F CONFIG_FILE, Alternate location for ssh config file
-P,
-p,
-x,
-s,
-V,
-v,
-W,
-y,
-h,
, ( -).
, , chef-. , -.
Update
: