0

I'm looking to send some kind of environment variable using "SCP -o" (or any other file transfer protocol for that matter PSFTP, PSCP, etc).

I currently use SCP to transfer files between Linux/Windows servers. The Linux servers are protected with Duo for Unix. When I use SCP (either WinSCP or SCP CLI), the authentication will hang as I receive a push on my phone. Once I accept the push the authentication will continue and the file will transfer successfully. However, our organization is disabling the push functionality in favor of OTP codes (or other, more secure MFA methods). Duo for Unix accepts OTP codes as an environment variable ($DUO_PASSCODE=58473).

Currently, I can send this variable with the OTP code via SSH using PuTTY (or via CLI with SendEnv=$DUO_PASSCODE=58473). I'm looking to see if there's anyway to accomplish this using either SCP, PSCP, or PSFTP. Any help is appreciated!

New contributor
horsman is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
  • 4
    In Linux both scp and sftp from OpenSSH support -o that allows passing SendEnv to the underlying ssh. Commented 13 hours ago

0

You must log in to answer this question.

Browse other questions tagged .