Commit 0a00104
fix: add SSH options to sftp to allow sshpass password auth
sftp -b - (batch mode) suppresses the interactive password prompt that
sshpass relies on to inject the password. SSH then tried pubkey (failed)
and a non-interactive password attempt (failed), giving:
Permission denied (publickey,password). Connection closed.
Fix: pass -o PubkeyAuthentication=no -o PreferredAuthentications=password
to sftp so SSH skips pubkey entirely and goes straight to the password
exchange, which sshpass -e can then satisfy from the SSHPASS env var.
Co-authored-by: igaw <1050803+igaw@users.noreply.github.com>1 parent e8cc256 commit 0a00104
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
| |||
0 commit comments