![如何通过VPN IP ssh进入dockovpn服务器](https://linux22.com/image/223099/%E5%A6%82%E4%BD%95%E9%80%9A%E8%BF%87VPN%20IP%20ssh%E8%BF%9B%E5%85%A5dockovpn%E6%9C%8D%E5%8A%A1%E5%99%A8.png)
我已经部署了一个码头OVPN我想通过 ssh 连接到运行 ovpn docker 容器的主机。连接本身似乎没问题。我尝试通过 ovpn 容器内 tun0 接口的 ifconfig 中显示的 VPN IP(inet addr 和 p-2-p addr)进行连接,但无法建立连接。目标是通过 dokovpn ssh 跳转到本地网络中的计算机。
生成的OVPN文件:
client
dev tun
proto udp
resolv-retry infinite
nobind
persist-key
persist-tun
cipher AES-256-GCM
auth SHA512
verb 3
tls-client
tls-version-min 1.2
key-direction 1
remote-cert-tls server
remote // EXTERNAL_IP // 1194
<ca>
-----BEGIN CERTIFICATE-----
// CERTIFICAT BODY //
-----END CERTIFICATE-----
</ca>
<cert>
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
// CERTIFICATE_SERIAL_NUMER //
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=Easy-RSA CA
Validity
Not Before: Jul 30 20:57:44 2023 GMT
Not After : Nov 1 20:57:44 2025 GMT
Subject: CN=// HASH //
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public-Key: (2048 bit)
Modulus:
// MODULUS_BODY //
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Subject Key Identifier:
// BASE 16 HASH //
X509v3 Authority Key Identifier:
// BASE 16 HASH //
DirName:/CN=Easy-RSA CA
// BASE 16 HASH //
X509v3 Extended Key Usage:
TLS Web Client Authentication
X509v3 Key Usage:
Digital Signature
Signature Algorithm: sha256WithRSAEncryption
// BASE 16 HASH //
fd:4e:64:c9
-----BEGIN CERTIFICATE-----
// CERT BIDY //
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
// KEY BODY //
-----END PRIVATE KEY-----
</key>
<tls-auth>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
// KEY BODY //
-----END OpenVPN Static key V1-----
</tls-auth>
;client-id // CLIENT ID //