how it works ? sftp

Hi,

I am curious about this script , how it is running ..?

#!/bin/sh
echo "OK, starting now..."
ftp remotehost <<EOF

When I run , it is asking
OK, starting now...
Password:Name (remotehost):

SHould I enter only password ?

and explain me how it works..

thanks in advance..

Your title says "sftp" but your script shows that you are using ftp. Which is it?

ftp is an unencrypted transfer. You may need to provide a password if you are accessing a protected directory. Anonomous ftp works by just being lax in the authentication. You enter anonomous as the account an email address as the password. Few systems even validate the email for form, less accuracy.

sFTP is an encrypted transfer. You may use a password to authenticate to a host. (or you can use a digital certificate).

okay,thanks,,

I need to transfer some of the log files from one host to another, while transfering it should not ask any password,so is it possible to do ?/ ?

thanks in advance..