FTP Upload

Can any one help in writing FTP upload script using bash ..

with specific port
-oPort=62022

#/bin/bash
FTPU="username" # ftp login name
FTPP="password" # ftp password
FTPS="localhost.com" # remote ftp server
FTPF="/test" # remote ftp server directory for $FTPU & $FTPP
port="2345"
LOCALD="/tmp/*.gpg"
ncftpput -m -u  $FTPU -p $FTPP -P $port $FTPS  $FTPF $LOCALD

what is your problem?

this the error i am getting while i execute above script , if i do manual upload its works.
for manual upload i use sftp .

be sure so your ftp host is alive and/or it's IP address is correct and/or host's or dns records's properly configured (test with dig/host/nslookup)