scorpiox-sshpass is an SSH wrapper that feeds passwords through a PTY (pseudo-terminal) to automate SSH authentication. Designed for home lab environments, it eliminates the need for interactive password prompts when scripting SSH connections. It spawns a child SSH process with a PTY and intercepts the password prompt to inject credentials automatically.
# Syntax
scorpiox-sshpass <password> ssh [ssh-options] user@host
scorpiox-sshpass <password> scp [scp-options] source destination
# Connect to a server with password authentication scorpiox-sshpass "myP@ssw0rd" ssh admin@192.168.1.50 # Connect on a custom port scorpiox-sshpass "myP@ssw0rd" ssh -p 2222 admin@192.168.1.50 # Disable host key checking (first-time lab setup) scorpiox-sshpass "myP@ssw0rd" ssh -o StrictHostKeyChecking=no admin@192.168.1.50
# Upload a file to a remote server scorpiox-sshpass "myP@ssw0rd" scp ./config.yaml admin@192.168.1.50:/etc/app/ # Download a log file from a remote server scorpiox-sshpass "myP@ssw0rd" scp admin@192.168.1.50:/var/log/app.log ./ # Recursive directory upload scorpiox-sshpass "myP@ssw0rd" scp -r ./deploy/ admin@192.168.1.50:/opt/app/
#!/bin/bash # Deploy to multiple hosts in a home lab HOSTS="192.168.1.50 192.168.1.51 192.168.1.52" PASS="labP@ss123" for HOST in $HOSTS; do echo "Deploying to $HOST..." scorpiox-sshpass "$PASS" scp ./app.bin admin@$HOST:/usr/local/bin/ scorpiox-sshpass "$PASS" ssh admin@$HOST "systemctl restart app" done
# Run a remote command and capture output scorpiox-sshpass "myP@ssw0rd" ssh admin@192.168.1.50 "df -h /dev/sda1" # Check uptime across lab machines scorpiox-sshpass "myP@ssw0rd" ssh admin@192.168.1.50 "uptime" # Pipe local data to a remote command cat hosts.txt | scorpiox-sshpass "myP@ssw0rd" ssh admin@192.168.1.50 "cat > /etc/hosts"