scp Pseudo-terminal will not be allocated because stdin is not a terminal

I’m trying to perform a scp call to move files between a local computer and my university remote servers.

The flow is to enter the details of the username, then it asks for an OTP password and if it’s correct, then you get asked to your own user password in the remote server.

The basic command I use is: For example – executing SSH:

$   ssh user@gw.cs.huji.ac.il (OTP) Password: ... (IDng) Password:  ###################################################################  You are using river-01 running debian64-5779 Linux  Please report problems to <system@cs>. ###################################################################  Last login: Thu May 23 20:59:31 2019 from 132.65.116.14 The only time a dog gets complimented is when he doesn't do anything.       -- C. Schulz <1|0> user@river-01:~% 

Note the option to create an ssh key is disabled, thus we have to go with this specific procedure.

Now I want to perform an SCP command to transfer “~/foo.txt” in the remote server to “./foo.txt”. I issue the command

scp -o user%river@gw.cs.huji.ac.il:~/foo.txt ./foo.txt 

But I Then get an error which’s related to TTY. Look at this output:

$   scp user%river@gw.cs.huji.ac.il:~/foo.txt ./foo.txt (OTP) Password: 454583 Pseudo-terminal will not be allocated because stdin is not a terminal. 

In other words, instead of asking the second password, it shows the Pesudo-terminal error.

I tried to set -o RequireTTY=force but it didn’t work. Is there any other way to handle this?

Thanks in advance!