我的 haproxy 实例服务于 2 个域(主要是为了避免主站点上的 XSS)。
规则看起来像这样
bind :443 ssl crt /etc/ssl/haproxy.pem
acl is_static hdr_end(Host) -i example.com
acl is_api hdr_end(Host) -i api.example.com
acl is_files hdr_end(Host) -i example.io
redirect scheme https if !{ ssl_fc } is_static is_api
Run Code Online (Sandbox Code Playgroud)
现在 SSL/etc/ssl/haproxy.pem
用作默认证书,它是example.com
而非的证书example.io
。
如何为多个域名指定证书?
要禁用密码身份验证,我在我的 sshd_config
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
Run Code Online (Sandbox Code Playgroud)
当我尝试使用我的私钥登录时,我得到
Permission denied (publickey).
Run Code Online (Sandbox Code Playgroud)
如果我然后更改UsePAM
为yes
我可以使用我的私钥登录。为什么?
我正在从 OSX 连接到 Ubuntu 12.04 64 位主机
ssh -i ~/.ssh/deploy -l deploy localhost -p 2222 -v
Run Code Online (Sandbox Code Playgroud)
这是详细的ssh
输出:
OpenSSH_5.9p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /Users/<user>/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to localhost [127.0.0.1] port 2222.
debug1: Connection established.
debug1: identity file /Users/<user>/.ssh/deploy type 1
debug1: identity file /Users/<user>/.ssh/deploy-cert …
Run Code Online (Sandbox Code Playgroud) 我想在没有 puppetmaster 的情况下使用 puppet,并使用 git push 工作流应用清单。我想避免将所有内容分成模块,因为服务器配置不是很复杂。但是,该template()
函数在访问不在模块中的模板时似乎存在问题。
如果清单位于<puppet-root>/manifests/site.pp
我如何引用例如<puppet-root>/templates/sshd_config.erb
?
我需要从目标机器上的 S3 中提取构建。因此,我需要以某种方式将 S3 密钥和秘密传递给 ansible playbook。
我知道我可以定义它们
但我真的不想在那里存储凭据。
我可以在 ansible playbook 中使用来自本地机器(或类似的东西)的环境变量吗?
我需要将机器配置为负载均衡器(可能使用 HAProxy),现在的问题是