Laptop se commands run karo → SSH via WiFi → Mobile Termux → Real SMS
# Storage permission
termux-setup-storage
# Update packages
pkg update && pkg upgrade -y
# Install required packages
pkg install termux-api openssh nodejs -y
# Test SMS permission
termux-sms-list
# Allow SMS permissions in popup# Set password for SSH access
passwd
# Enter password: termux123 (or apna password)
# Start SSH server
sshd
# Check if running
pgrep sshd
# Should show a process ID# Get IP address
ifconfig wlan0 | grep 'inet '
# Example output: inet 192.168.1.100
# Or simpler:
ip -4 addr show wlan0 | grep inetNote down your IP address! Example: 192.168.1.100
whoami
# Example output: u0_a123Note down your username! Example: u0_a123
# Test connection (replace with your mobile IP and username)
ssh -p 8022 u0_a123@192.168.1.100
# Enter password when asked: termux123
# If successful, you'll see Termux prompt
# Type: exit# Generate SSH key (if not already exists)
ssh-keygen -t rsa -b 4096
# Press Enter for all prompts (default location)
# Copy key to Termux
ssh-copy-id -p 8022 u0_a123@192.168.1.100
# Enter password: termux123
# Test passwordless login
ssh -p 8022 u0_a123@192.168.1.100
# Should login without password now!# Single command to send SMS via SSH
ssh -p 8022 u0_a123@192.168.1.100 "termux-sms-send -n '+919456974451' 'Test from laptop via SSH!'"✅ SMS should arrive on +919456974451!
Edit your .env file:
# SMS Configuration
SMS_MODE=termux-ssh
SMS_ENABLED=true
TEST_PHONE_NUMBER=+919456974451
# Termux SSH Details
TERMUX_IP=192.168.1.100 # Your mobile IP
TERMUX_PORT=8022
TERMUX_USER=u0_a123 # Your Termux username# Test single SMS
node src/testing/quick-sms-test.js
# Test all SMS templates
node src/testing/test-sms-templates.js# On mobile (Termux):
sshd # Start SSH server
pgrep sshd # Verify it's running# On mobile (Termux):
ip -4 addr show wlan0 | grep inet
# Update TERMUX_IP in .env# On laptop:
ssh-copy-id -p 8022 u0_a123@192.168.1.100
# Re-enter password# On mobile (Termux):
termux-sms-list # Re-check permissions
# Allow SMS permissionsStart SSH Server (Mobile):
sshdStop SSH Server (Mobile):
pkill sshdCheck SSH Status (Mobile):
pgrep sshdSend SMS from Laptop:
ssh -p 8022 u0_a123@192.168.1.100 "termux-sms-send -n '+919456974451' 'Test message'"- Termux installed on mobile
- Termux:API installed on mobile
- SSH server running on mobile (
sshd) - Mobile IP address noted
- Termux username noted
- SSH connection tested from laptop
- SMS permissions granted
-
.envconfigured with Termux details - Test SMS successful
Now you can run SMS commands from laptop, and they'll execute on mobile via SSH!
node src/testing/test-sms-templates.jsAll SMS will be sent from your mobile! 📱✅