【发布时间】:2017-07-11 15:52:02
【问题描述】:
我为端口转发创建了一个 ssh 隧道,以便将笔记本电脑上的端口映射到远程主机上的端口 (your-mv.com):
ssh -nfNT -L 3376:your-mv.com:3376 login@server.com
然后我更改了docker_host 并设置了docker tls 变量:
export DOCKER_HOST=localhost:3376
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH=/my/path
然后我跑:
docker ps
但我有一个错误:
Get https://localhost:3376/v1.26/containers/json: x509: certificate is valid for your-mv.com, not localhost
你能帮我做错什么以及如何克服这个问题吗?
UPD
我的笔记本电脑的通用名称是subject= /CN=kenenbek。 CA 的通用名称为subject= /CN=cert-authority.com,远程主机的通用名称为subject= /CN=your-vm.com。
【问题讨论】:
标签: ssl docker ssl-certificate x509certificate ssh-tunnel