Skip to content

Instantly share code, notes, and snippets.

@Longhanks
Last active February 1, 2018 09:10
Show Gist options
  • Save Longhanks/669f6750aee4a90e2e85fb277f5731d9 to your computer and use it in GitHub Desktop.
Save Longhanks/669f6750aee4a90e2e85fb277f5731d9 to your computer and use it in GitHub Desktop.
Python debugging via SSH relay
/etc/ssh/sshd_config:
GatewayPorts yes
Tunnel command:
ssh -R $SSH_RELAY_OPEN_PORT:localhost:$DEBUGGER_PORT $USER@$SSH_RELAY
Python source:
pydevd.settrace('$SSH_RELAY', port=$SSH_RELAY_OPEN_PORT, stdoutToServer=True, stderrToServer=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment