Skip to content

Commit 1f7e9bd

Browse files
authored
Merge pull request #38 from Dstack-TEE/libressl
Fix libressl tls tunnel problem for ssh
2 parents 8c1f88b + d7e78a2 commit 1f7e9bd

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed
Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# SSH Over TPROXY Example
1+
# SSH Over Gateway Example
22

3-
This guide illustrates how to set up an SSH server within a tapp and access it using a public tproxy endpoint.
3+
This guide illustrates how to set up an SSH server within a tapp and access it using a public dstack-gateway endpoint.
44

55
## Installation Steps
66

@@ -11,9 +11,9 @@ This guide illustrates how to set up an SSH server within a tapp and access it u
1111
Add the following configuration block to your `~/.ssh/config` file:
1212
```
1313
Host my-tee-box
14-
ProxyCommand openssl s_client -quiet -connect <app-id>-1022.<tproxy-serv-domain>:443
14+
ProxyCommand openssl s_client -quiet -connect <app-id>-1022.<dstack-serv-domain>:443
1515
```
16-
Be sure to replace `<app-id>` with your tapp's application ID and `<tproxy-serv-domain>` with your tproxy server's domain.
16+
Be sure to replace `<app-id>` with your tapp's application ID and `<dstack-serv-domain>` with your dstack-gateway server's domain.
1717
Change the 443 to the port of the dstack-gateway if not using the default one.
1818
Example ProxyCommand: `ProxyCommand openssl s_client -quiet -connect c3c0ed2429a72e11e07c8d5701725968ff234dc0-1022.dstack-prod5.phala.network:443`
1919

@@ -22,3 +22,14 @@ This guide illustrates how to set up an SSH server within a tapp and access it u
2222
```
2323
ssh root@my-tee-box
2424
```
25+
26+
> [!WARNING]
27+
> macOS users may encounter connection timeout problem when connecting to the tls endpoint. That's
28+
> because the `openssl` shipped with the OS is LibraSSL and the syntax is slightly different. You
29+
> can confirm your `openssl` version by `openssl version`.
30+
>
31+
> There's a simple fix. Install [homebrew](https://brew.sh/) and install OpenSSL:
32+
>
33+
> `brew install openssl`
34+
>
35+
> Then the connection should be good.

tcp-port-forwarding/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ For dstack apps using dev OS images, SSH access is available through the CVM. Co
5555
```bash
5656
Host my-dstack-app
5757
HostName <your-app-id>-22.<the-dstack-gateway-domain>
58+
User root
5859
Port 443
5960
ProxyCommand openssl s_client -quiet -connect %h:%p
6061
```
@@ -63,9 +64,19 @@ Change the 443 to the port of the dstack-gateway if not using the default one.
6364

6465
2. Connect:
6566
```bash
66-
ssh root@my-dstack-app
67+
ssh my-dstack-app
6768
```
6869

70+
> [!WARNING]
71+
> macOS users may encounter connection timeout problem when connecting to the tls endpoint. That's
72+
> because the `openssl` shipped with the OS is LibraSSL and the syntax is slightly different. You
73+
> can confirm your `openssl` version by `openssl version`.
74+
>
75+
> There's a simple fix. Install [homebrew](https://brew.sh/) and install OpenSSL:
76+
>
77+
> `brew install openssl`
78+
>
79+
> Then the connection should be good.
6980
## TCP Port Forwarding Options
7081

7182
### Using socat (Unix-like systems)

0 commit comments

Comments
 (0)