Skip to content

Commit

Permalink
remove debug print
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-lombardi committed Dec 31, 2024
1 parent 8d5cb47 commit a694632
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
15 changes: 3 additions & 12 deletions sdk/src/beta9/abstractions/endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,24 +662,15 @@ def shell(self, timeout: int = 0, url_type: str = ""):
container_id,
self.parent.config_context.token,
)
print(
"Tunnel established! You can now speak SSH (or any protocol) over `tunnel_socket`."
)
except Exception as e:
terminal.error(f"Failed to establish CONNECT tunnel: {e}")
except BaseException:
terminal.error(f"Failed to establish ssh tunnel: {traceback.format_exc()}")

import paramiko

try:
# Initialize the transport with the cleaned socket
transport = paramiko.Transport(tunnel_socket)
print("Starting client")
transport.start_client()

# Authenticate with the server
transport.auth_password("runc", ssh_token)

# Open a session and start an interactive shell
session = transport.open_session()

with SSHShell(
Expand Down Expand Up @@ -736,5 +727,5 @@ def create_connect_tunnel(
s.close()
raise Exception(f"CONNECT failed. Response:\n{response_str}")

# If we reach here, we have a raw TCP tunnel to container_id
# If we reach here, we have a raw TCP tunnel to "container_id"
return s
1 change: 0 additions & 1 deletion sdk/src/beta9/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ def _open(self):

self._channel = self.channel

print("self._channel", self._channel)
return self._channel

def _launch(self):
Expand Down

0 comments on commit a694632

Please sign in to comment.