Files
aitbc/.windsurf/skills/ssh-access-patterns.md
aitbc 1b43859291
All checks were successful
Cross-Node Transaction Testing / transaction-test (push) Successful in 3s
Deploy to Testnet / deploy-testnet (push) Successful in 1m8s
Multi-Node Stress Testing / stress-test (push) Successful in 2s
Node Failover Simulation / failover-test (push) Successful in 2s
docs: add RPC endpoint examples and SSH best practices to access patterns
- Add curl example for localhost RPC endpoint (127.0.0.1:8006/rpc/head)
- Add RPC access examples for aitbc1 (localhost and aitbc hostname)
- Create Important Notes section with SSH best practices
- Document localhost command execution (no SSH needed)
- Add guidance on proper quoting and connectivity testing
2026-05-09 18:06:10 +02:00

2.0 KiB

SSH Access Patterns for AITBC Nodes

Purpose

Document SSH access patterns for all AITBC nodes in the infrastructure.

Node Access Patterns

aitbc (localhost)

Direct access - no SSH required.

# Run commands directly on localhost
echo "command"
systemctl restart service-name
curl http://127.0.0.1:8006/rpc/head

aitbc1

Direct SSH access.

ssh aitbc1
# Or execute single command
ssh aitbc1 "command"
# Access aitbc1's blockchain RPC
ssh aitbc1 "curl http://127.0.0.1:8006/rpc/head"
# Access aitbc from aitbc1
ssh aitbc1 "curl http://aitbc:8006/rpc/head"

gitea-runner (hosts aitbc2 blockchain node)

Direct SSH access. The aitbc2 blockchain node runs on this same host.

ssh gitea-runner
# Or execute single command
ssh gitea-runner "command"
# aitbc2 blockchain node runs on this host

# Execute aitbc2-specific commands
ssh gitea-runner "/opt/aitbc/aitbc-cli blockchain info"
ssh gitea-runner "systemctl status aitbc-blockchain-node --no-pager"

Important Notes

  • Never SSH to localhost: Commands should run directly on the local machine
  • Use proper quoting: When passing commands to SSH, use single quotes to prevent shell expansion
  • Test connectivity: Verify RPC endpoints are accessible before running sync operations

Common Operations

Check service status on aitbc1

ssh aitbc1 "systemctl status aitbc-blockchain-node --no-pager"

Restart service on gitea-runner (aitbc2)

ssh gitea-runner "systemctl restart aitbc-blockchain-node"

Copy file to aitbc1

scp /path/to/file aitbc1:/path/to/destination

Execute script on gitea-runner

ssh gitea-runner "bash /path/to/script.sh"

Multi-Node Operations

Run command on all remote nodes

for node in aitbc1 gitea-runner; do
  ssh "$node" "systemctl status aitbc-blockchain-node --no-pager"
done

Check block heights across all nodes

for node in aitbc1 gitea-runner; do
  echo "=== $node ==="
  ssh "$node" "curl -s http://localhost:8006/rpc/bestBlock | jq '.height'"
done