Skip to content

Instantly share code, notes, and snippets.

View yetimdasturchi's full-sized avatar
👨‍💻
Fisting code

Manuchehr Usmonov yetimdasturchi

👨‍💻
Fisting code
View GitHub Profile
@yetimdasturchi
yetimdasturchi / openvpn_runner.sh
Created August 4, 2025 16:15
Run commands on remote servers
#!/bin/bash
VPN_SERVER="10.8.0.1"
STATUS_COMMAND="/root/openvpn_status.sh"
output=$(ssh -o BatchMode=yes -o ConnectTimeout=5 root@$VPN_SERVER "$STATUS_COMMAND")
if [[ $? -ne 0 ]]; then
echo "Failed to connect to $VPN_SERVER or run the command."
exit 1