shutdown57

SSH AUTO LOGIN MULTI TERMINAL FOR MONITORING BULK SERVER

Jul 7th, 2025
1,189
0
Never
15
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.47 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Multi-SSH Connection Script with Alacritty Support
  4. # Usage: ./multi-ssh.sh [config_file]
  5. # If no config file is provided, it will use servers.conf in the same directory
  6. # CONFIG FILE FORMAT.
  7. #  TITLE:USER@HOSTNAME:PORT:PASSWORD
  8. # EXAMPLE : MyVps:[email protected]:22:passwd12
  9.  
  10. SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
  11. CONFIG_FILE="${1:-$SCRIPT_DIR/servers.conf}"
  12.  
  13. # Check if config file exists
  14. if [[ ! -f "$CONFIG_FILE" ]]; then
  15.    echo "Error: Config file '$CONFIG_FILE' not found!"
  16.    echo "Please create a config file with server details."
  17.    echo "Example format:"
  18.    echo "server1:user@hostname1"
  19.    echo "server2:user@hostname2:port"
  20.    echo "server3:user@hostname3"
  21.    exit 1
  22. fi
  23.  
  24. # Detect terminal emulator
  25. detect_terminal() {
  26.    if [[ -n "$GNOME_TERMINAL_SCREEN" ]] || command -v gnome-terminal >/dev/null 2>&1; then
  27.        echo "gnome-terminal"
  28.    elif command -v terminator >/dev/null 2>&1; then
  29.        echo "terminator"
  30.    elif command -v konsole >/dev/null 2>&1; then
  31.        echo "konsole"
  32.    elif command -v xfce4-terminal >/dev/null 2>&1; then
  33.        echo "xfce4-terminal"
  34.    elif command -v tilix >/dev/null 2>&1; then
  35.        echo "tilix"
  36.    elif command -v alacritty >/dev/null 2>&1; then
  37.        echo "alacritty"
  38.    else
  39.        echo "unknown"
  40.    fi
  41. }
  42.  
  43. # Function to open SSH connection in new tab/window
  44. open_ssh_connection() {
  45.    local server_name="$1"
  46.    local ssh_command="$2"
  47.    local terminal="$3"
  48.  
  49.    case "$terminal" in
  50.        "gnome-terminal")
  51.            gnome-terminal --tab --title="$server_name" -- bash -c "$ssh_command; exec bash"
  52.            ;;
  53.        "terminator")
  54.            terminator --new-tab --title="$server_name" -e "bash -c '$ssh_command; exec bash'"
  55.            ;;
  56.        "konsole")
  57.            konsole --new-tab --title "$server_name" -e bash -c "$ssh_command; exec bash"
  58.            ;;
  59.        "xfce4-terminal")
  60.            xfce4-terminal --tab --title="$server_name" -e "bash -c '$ssh_command; exec bash'"
  61.            ;;
  62.        "tilix")
  63.            tilix --new-session --title="$server_name" -e "bash -c '$ssh_command; exec bash'"
  64.            ;;
  65.        "alacritty")
  66.            alacritty -t "$server_name" -e bash -c "$ssh_command; exec bash" &
  67.            ;;
  68.        *)
  69.            echo "Opening $server_name in new terminal window..."
  70.            x-terminal-emulator -e bash -c "$ssh_command; exec bash" &
  71.            ;;
  72.    esac
  73. }
  74.  
  75. # Main execution
  76. main() {
  77.    local terminal=$(detect_terminal)
  78.    echo "Detected terminal: $terminal"
  79.    echo "Reading servers from: $CONFIG_FILE"
  80.    echo "Opening SSH connections..."
  81.  
  82.    if [[ "$terminal" == "unknown" ]]; then
  83.        echo "Error: No supported terminal emulator found!"
  84.        exit 1
  85.    fi
  86.  
  87.    while IFS=':' read -r server_name ssh_target port password || [[ -n "$server_name" ]]; do
  88.        # Skip empty lines and comments
  89.        [[ -z "$server_name" || "$server_name" =~ ^[[:space:]]*# ]] && continue
  90.  
  91.        # Default port
  92.        [[ -z "$port" ]] && port=22
  93.  
  94.        # Build SSH command with sshpass
  95.        ssh_cmd="sshpass -p '$password' ssh -t -o StrictHostKeyChecking=no -p $port $ssh_target 'export TERM=xterm; htop; exec bash'"
  96.  
  97.        echo "Connecting to $server_name ($ssh_target)..."
  98.        open_ssh_connection "$server_name" "$ssh_cmd" "$terminal"
  99.  
  100.        sleep 0.5
  101.    done < "$CONFIG_FILE"
  102.  
  103.    echo "All SSH connections initiated!"
  104. }
  105.  
  106. # Run the script
  107. main
  108.  
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Korweutov
    109 days
    # CSS 0.83 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1S1iTruSLkgEPO8QtTuo2twS4f2FoJ3_l0-p4GKqeAUY/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8.  
    9. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    10.  
    11. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification).
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment