jeudi 29 janvier 2015

Using lftp with ssh-agent


I have a script that logs into sftp server



eval `ssh-agent -s`
ssh-add /home/<username>/.ssh/id_rsa
sftp <username>@<target>


This works, but I would like to get only files that are newer than certain date. This doesn't seem to be possible with sftp, so I would like to use lftp


If I try to run the same script with lftp



eval `ssh-agent -s`
ssh-add /home/<username>/.ssh/id_rsa
lftp <username>@<target>


I get a prompt for password. Is it possible to use lftp with ssh-agent or is there some other way to avoid supplying the password?



Aucun commentaire:

Enregistrer un commentaire