sshpass howto
hi All,
hoping to find You all well. I need to use sshpass in an sh script, please : avoid recommending to use a public key : I know what it is I always use but this is not the case thanks ! so normally if I run this sh script I need to insert manually the password : Code:
#!/usr/bin/sh Avoiding to post all the fake examples copied and re-copied and re-copied again around the web that don't want to work... Can I kindly have an help in how to use sshpass in my scirpt.sh ? thanks Gio |
SSH_ASKPASS is probably your friend.
|
It looks like you are trying to use batch mode, but missing the -b option. Batch mode will not work without SSH keys (or SSH certificates instead) for authentication. So keys are not so much a recommendation as they are a requirement.
Code:
cat << EOF | sftp -i somekey -b - -P 22 username@host.example.com |
All times are GMT -5. The time now is 02:08 AM. |