gpt4 book ai didi

macos - chef-solo 停止多次询问服务器密码

转载 作者:行者123 更新时间:2023-12-04 18:38:09 24 4
gpt4 key购买 nike

当我运行引导命令时,它会多次询问密码

Running Chef on 123.123.123.123...
Installing Librarian cookbooks...
Uploading the kitchen...
Enter the password for root@123.123.123.123:
root@123.123.123.123's password:
root@123.123.123.123's password:
root@123.123.123.123's password:
root@123.123.123.123's password:
root@123.123.123.123's password:
root@123.123.123.123's password:
root@123.123.123.123's password:
root@123.123.123.123's password:
Generating solo config...
root@123.123.123.123's password:
Running Chef...
Starting Chef Client, version 11.10.4

有什么方法可以阻止这种情况并一次性使用密码吗?

最佳答案

看着knife bootstrap -h文档:

knife bootstrap FQDN (options)
--bootstrap-no-proxy [NO_PROXY_URL|NO_PROXY_IP]
Do not proxy locations for the node being bootstrapped; this option is used internally by Opscode
--bootstrap-proxy PROXY_URL The proxy server for the node being bootstrapped
--bootstrap-version VERSION The version of Chef to install
-N, --node-name NAME The Chef node name for your new node
--server-url URL Chef Server URL
--chef-zero-port PORT Port to start chef-zero on
-k, --key KEY API Client Key
--[no-]color Use colored output, defaults to false on Windows, true otherwise
-c, --config CONFIG The configuration file to use
--defaults Accept default values for all questions
--disable-editing Do not open EDITOR, just accept the data as is
-d, --distro DISTRO Bootstrap a distro using a template
-e, --editor EDITOR Set the editor to use for interactive commands
-E, --environment ENVIRONMENT Set the Chef environment
-j JSON_ATTRIBS, A JSON string to be added to the first run of chef-client
--json-attributes
-F, --format FORMAT Which format to use for output
-A, --forward-agent Enable SSH agent forwarding
--hint HINT_NAME[=HINT_FILE] Specify Ohai Hint to be set on the bootstrap target. Use multiple --hint options to specify multiple hints.
--[no-]host-key-verify Verify host key, enabled by default.
-i IDENTITY_FILE, The SSH identity file used for authentication
--identity-file
-z, --local-mode Point knife commands at local repository instead of server
-u, --user USER API Client Username
--prerelease Install the pre-release chef gems
--print-after Show the data after a destructive operation
-r, --run-list RUN_LIST Comma separated list of roles/recipes to apply
-s, --secret The secret key to use to encrypt data bag item values
--secret-file SECRET_FILE A file containing the secret key to use to encrypt data bag item values
-G, --ssh-gateway GATEWAY The ssh gateway
-P, --ssh-password PASSWORD The ssh password
-p, --ssh-port PORT The ssh port
-x, --ssh-user USERNAME The ssh username
--template-file TEMPLATE Full path to location of template to use
--sudo Execute the bootstrap via sudo
--use-sudo-password Execute the bootstrap via sudo with password
-V, --verbose More verbose output. Use twice for max verbosity
-v, --version Show chef version
-y, --yes Say yes to all prompts for confirmation
-h, --help Show this message

您可以看到有传递 --sudo 的选项, --use-sudo-password , 和 --ssh-password选项。如果没有更多信息,我无法告诉您使用哪一个,但其中之一可以让您在引导期间指定密码。

关于macos - chef-solo 停止多次询问服务器密码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22200356/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com