Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option -f with 2 factor authentication ->asks for password but not for verification code #744

Open
baalkor opened this issue Nov 19, 2024 · 2 comments

Comments

@baalkor
Copy link

baalkor commented Nov 19, 2024

Hello,

We've faced recently an issue with lftp. We have people connecting to a SFTP server using password and verification code (pam.d/sshd => google auth).
Interactively, when we open a session it works fine :

$> lftp sftp://username@host
Password:
Verification code

We need to automate the transfert and be able to create a script file containing some download command.
For an unkown reason

$> cat test-cmds.txt
ls
pwd

$> lftp sftp://username@host -f test-cmds.txt
Password:

It doesn't ask for the verification code at all and then no connection is done.

We've tested unsucessfully :
$> lftp -u username, pass sftp://hosts
$> lftp sftp://username@host -e 'set sftp:connect-program "ssh -a -x"
$> lftp sftp://username@host -e 'set sftp:connect-program "sftp"

TLDR; Why password and verification codes are both requested in interactive mode while only password is requested in scripting mode (-f). Is there a way we can trigger this verification code request manuall ?

@lavv17
Copy link
Owner

lavv17 commented Nov 19, 2024 via email

@baalkor
Copy link
Author

baalkor commented Nov 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants