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

I am trying to automate a SSH login using Keys using the following command
ssh -i id_rsa usernamw@ipaddr.
I am successful in doing this and i am getting the Warning Screen and I logon successfully.
but when I am executing the command
tail -1cf put.dat | ssh -i id_rsa username@ipaddr > get.dat 2>&1
It displays me with the error message "Pseudo-terminal will not be allocated because stdin is not a terminal" and I am not able to get the warning Screen.
Could anyone please help.Its on priority.....

hello,

The solution to use ssh command without using the console(tty) is to add -t -t option.
example:

ssh -t -t -R 8080:127.0.0.1:80 root@192.168.1.1

The -t -t option is useful to execute ssh script in a crontab without error:

Have fun...
sincerely.