-3

Previously I downloaded a CSV file from an SFTP server using SSHPASS where the authentication method was through username/password and not public key:

sshpass -p [SFTP_SERVER_PASSWORD] sftp -o StrictHostKeyChecking=no -o HostKeyAlgorithms=+ssh-dss [USERNAME]@ftp1.exacttarget.com <<EOF
get -r /Export/MyFile.csv
EOF

The SFTP server has now added the public key (created on my Ubuntu server) and so I would like to change the command above to communicate without a password. What options should I add/remove?

disasterkid
  • 6,948
  • 25
  • 94
  • 179

1 Answers1

1

As you don't need sshpass any longer, change your call to

sftp -o StrictHostKeyChecking=no -o HostKeyAlgorithms=+ssh-dss [USERNAME]@ftp1.exacttarget.com <<EOF
get -r /Export/MyFile.csv
EOF
glglgl
  • 89,107
  • 13
  • 149
  • 217