Skip to content

Instantly share code, notes, and snippets.

@msoranno
Created October 4, 2017 14:06
Show Gist options
  • Save msoranno/fe5eb2e027a6d0f87a936e20fc017586 to your computer and use it in GitHub Desktop.
Save msoranno/fe5eb2e027a6d0f87a936e20fc017586 to your computer and use it in GitHub Desktop.
Getting a file via sftp
#!/bin/bash
export SSHPASS=somepass
sshpass -e sftp -oBatchMode=no -b - someuser@some.server.com << !
cd /bksPruebas/SCRIPTS_SALUD/SCRIPTSALUD_V01R00F00_Alfa2/
get SCRIPTSALUD_V01R00F00_Alfa2.zip
bye
!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment