Passwordless connection to sftp server using lftp
Hello. This is my first time writing to this forum and I thought this was the best place for this question. I apologize if it is not (I've read the guidelines).
I'm running the following script that uses lftp: lftp -f " open sftp://myuser@sftp_server:443 lcd $FTP_FOLDER mirror --no-empty-dirs --only-newer --verbose $FTP_FOLDER $LOCAL_FOLDER bye " Now If I've allready passed my public key to the server administrator so if do this in the command line sftp -P 443 myuser@sftp_server I get connected and I get the sftp prompt. When I do this the pwd command tells me that the folder that I need to sync has the path "/0Datos" and that is the value of $FTP_FOLDER. When I execute the script I get this: source: Is a directory Password: Is there any way to connect without the server asking me for a password (I don't have it) in order to sync the folder 0Datos to a local folder of mine? Thank you for your time. |
Quote:
if admin have setup the authentication mechanism to prompt for the password the configuration would anyways look for it and reject your login unless you are privilaged for passwordless login by your admin. however if you are an authorised user try this |
Thanks for the reply. But I don't get it. The admin set it up so that I can login with my public key. Why is it different when using lftp?
|
You have to use a meaningless placeholder text:
Code:
lftp -u username,placeholder sftp://1.2.3.4 |
seems like scp or sshfs would be easier in this context ?
|
Thank you so very much!!! That did the trick. For completion I'm posting my script for remote sychronization under this scenario.
Code:
lftp -f " |
All times are GMT -5. The time now is 10:22 AM. |