Files
aitbc/scripts/ops/start_remote_tunnel.sh
oib 3b4cc69179 refactor: organize scripts/, remove stale root dirs, clean up structure
scripts/ reorganization:
- Sort 14 loose root scripts into subfolders:
  blockchain/ (genesis, proposer, mock chain, testnet BTC)
  dev/ (CLI wrapper, dev services, OpenAPI gen, systemd setup, domain proxy)
  ops/ (coordinator proxy, remote tunnel)
  gpu/ (miner workflow)
- Merge scripts/testing/ into scripts/test/ (eliminate duplicate folder)
- Create scripts/examples/ for usage demos and simulations

Root-level cleanup:
- Move home/ (12 simulation scripts) → scripts/examples/
- Move dev-utils/ (2 files) → scripts/dev/
- Move protocols/receipts/sample → tests/fixtures/
- Delete stale src/ (duplicate of apps/blockchain-node/src/)
- Remove empty home/, dev-utils/, protocols/ directories

Documentation updates:
- Update docs/6_architecture/8_codebase-structure.md tree and table
- Update root README.md tree to reflect new structure
2026-02-13 23:26:53 +01:00

23 lines
611 B
Bash
Executable File

#!/bin/bash
# Start SSH tunnel to remote AITBC coordinator
echo "Starting SSH tunnel to remote AITBC coordinator..."
# Check if tunnel is already running
if pgrep -f "ssh.*-L.*8001:localhost:8000.*aitbc" > /dev/null; then
echo "✅ Tunnel is already running"
exit 0
fi
# Start the tunnel
ssh -f -N -L 8001:localhost:8000 aitbc
if [ $? -eq 0 ]; then
echo "✅ SSH tunnel established on port 8001"
echo " Remote coordinator available at: http://localhost:8001"
echo " Health check: curl http://localhost:8001/v1/health"
else
echo "❌ Failed to establish SSH tunnel"
exit 1
fi