sshpass-win32 xhcoding
Use this command to install sshpass-win32:
winget install --id=xhcoding.sshpass-win32 -e Windows version of sshpass - noninteractive ssh password provider
winget install --id=xhcoding.sshpass-win32 -e Windows version of sshpass - noninteractive ssh password provider
Like https://linux.die.net/man/1/sshpass
To run sshpass, you must install:
winget install xhcoding.sshpass-win32
Usage: sshpass [ options ] command arguments
-h, --help show this help message and exit
Password options: With no options - password will be taken from stdin
-f= Take password to use from file
-d= Use number as file descriptor for getting password
-p= Provide password as argument (security unwise)
-e Password is passed as env-var "SSHPASS"
Other options:
-P= Which string should sshpass search for to detect a password prompt
-v Be verbose about what you're doing
-k Auto confirm 'Are you sure...' prompt for host keys
sshpass -p 12345 ssh xhcoding@192.168.139.128 ls
sshpass -p 12345 rsync -avz -e 'c:/Users/xhcoding/scoop/apps/cwrsync/current/bin/ssh.exe' README.md xhcoding@192.168.139.128:/home/xhcoding/