#!/usr/bin/env nu # SPDX-License-Identifier: AGPL-3.0-only # Copyright (c) 2025 MatrixFurry # Create a Podman remote TCP connection to a machine over SSH. This is insecure, be careful. @deprecated --report every "Use pods-remote instead" @category depricated export def main [ remote?: string ...rest --root (-r) # Connect to rootful socket ] { if $root { ssh -tL 2047:localhost:47 $remote ...$rest "sudo socat TCP-LISTEN:47,reuseaddr,fork UNIX-CONNECT:/run/podman/podman.sock" } else { ssh -tL 2047:localhost:2047 $remote ...$rest "socat TCP-LISTEN:2047,reuseaddr,fork UNIX-CONNECT:/run/user/$UID/podman/podman.sock" } }