gee / start.sh
vish85521's picture
Upload 2 files
2b9126c verified
Raw
History Blame Contribute Delete
820 Bytes
#!/bin/bash
echo "Starting SSH daemon..."
/usr/sbin/sshd -D &
echo "Generating SSH client key for the tunnel..."
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -q -N ""
echo "Establishing Pinggy reverse TCP tunnel..."
# FIXED: Added tcp@ to force a TCP tunnel for SSH instead of an HTTP web tunnel.
ssh -p 443 -R0:localhost:22 -o StrictHostKeyChecking=no -o ServerAliveInterval=30 tcp@a.pinggy.io &
# Give the tunnel a few seconds to negotiate and print its connection string
sleep 5
echo "========================================================"
echo "Look closely at the logs above for the Pinggy TCP port!"
echo "It will look like: tcp://[url]:[PORT]"
echo "Connect using: ssh -p [PORT] root@[url]"
echo "========================================================"
echo "Starting Ollama engine..."
exec ollama serve