SFTP

How to use SFTP to get the files on unix server from anoter unix server without sending the password.
This is below script wrote
------------------------------------

#!/bin/ksh
#!/usr/local/bin/expect
sftp -oPort=<PORt_number> <Ipaddress> <<EOF
expect "password:"
send <password>
cd /test/test1
mget *.csv
bye
EOF

---------------------------------------
after running the com file system is asking for password.

Why don't you configure passphrase-less public-private key-pair for ssh? In that way, you do not have to use expect to automate password. Plus, there's a basic issue in your script. In any script, hash-bang is checked only at the very 1st line. Even though you have entered hash-bang at the second line, it's being treated as a comment by ksh.

'interactive password authentication' means 'password typed by a human being in realtime authentication' and no artificial substitutes for humans are acceptable. That you're trying to use a third-party brute-forcing utility to get around this limitation is because ssh/scp/sftp were designed to prevent you from doing so because it's a really bad idea. Retrievably-stored plaintext passwords are almost impossible to keep safe.

ssh keys as xor suggests would be a good idea.