I'm writing a bash script that automates the building, copying and running of a golang app to a remote server. I'm using
whiptail to let the user pick some options, enter in some details (e.g. SSH server name, username and password).
When I use
sshpass -p mypassword scp myfile user@remoteserver:/location/to/myfile I don't get any progress, the terminal just sits there until it's copied, then carries on. Obviously I can't pass this to whiptail's gauge option. When I run it without sshpass, I get progress info on the screen, but I'd rather use sshpass (not to mention when scp asks for a password, it breaks whiptail's dialog box). Running scp with -v gives tons of debug info but nothing I can clean up and feed into whiptail
So how would I go about showing a progress bar to the user while the file is copied over SSH?