I am trying to run a script which ftp the files from one server to another.
Below is the script -
#!/bin/bash
echo "Please enter no : "
read variable
echo "You entered: $input_variable"
host=xxxxx
USER=xxx
PASSWORD=xxx
ftp -inv $HOST <<EOF
user $USER $PASSWORD
cd /work/path/to/directory/$variable/test/
mput filename.csv
bye
EOF
How ever i am getting the below error -
ftp: connect: Connection refused Not connected. Not connected. Not connected. Not connected. Not connected. Not connected.
Could you please help. I am using SunOS