Skip to content

Instantly share code, notes, and snippets.

View idhantgulati's full-sized avatar

idhant idhantgulati

View GitHub Profile
@idhantgulati
idhantgulati / ssh.py
Last active March 27, 2026 07:25
to ssh into modal (https://modal.com/)
import modal, time, tempfile, os, sys
from pathlib import Path
from datetime import datetime
from tqdm import tqdm
# Default SSH public key paths (client side)
DEFAULT_PUBKEY = str(Path("~/.ssh/id_ed25519.pub").expanduser())
DEFAULT_ALTKEY = str(Path("~/Documents/id_ed25519.pub").expanduser())
_req_file = Path("~/modal-py-req.txt").expanduser()