ftp script not able to connect to ftp server.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ftp script not able to connect to ftp server.
# 1  
Old 02-14-2008
ftp script not able to connect to ftp server.

I have the following ftp script to get files from a remote location.
However, on running the script I find that I am not even able to connect to ftp server.

I am able to connect to ftp server using other GUI ftp tools like WS_FTP using the same IP.

IP used here is a dummy IP.

What can go wrong here?

#!/bin/ksh
ftp -vnd "111.111.111.111" << ++ 1>>readme.log 2>&1
user "me" "passwd"
prompt off
ascii
cd /f001/sftp/abc
lcd /export/home/abc
get BSH`date +%y%m%d`.HIST
bye
++
# 2  
Old 02-14-2008
why is there a space betwee << and ++ ?

Remove that try
# 3  
Old 02-16-2008
Even this does not connect!
ftp -vnd "111.111.111.111"

Planning this:
wget --ftp-user=me --ftp-password=passwd ftp://111.111.111.111/export/home/abc/$file
# 4  
Old 02-16-2008
Quote:
ftp -vnd "111.111.111.111" << ++ 1>>readme.log 2>&1
I didn't mean to remove the entry

it should be modified as

Code:
ftp -vnd "111.111.111.111" <<++ 1>>readme.log 2>&1

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Connect to database through FTP server

Hi All I need to run a query on a remote database through a shell script. I have the query, I have the script ready. I have the details of the database server I need to connect to. Now my problem here is , the server where I run the shell script is an FTP server. ->I do not have Oracle... (4 Replies)
Discussion started by: sparks
4 Replies

2. Shell Programming and Scripting

Not able to connect to new FTP server

Hi All, We have done new FTB setup. I am not able to to connect to this new target server. Here is the new setup to send files to the FTB : - Login : FTB-TAN-DEV-SAP - Protocol : SFTP - Port : 54322 - Hostname : ftb-dev.apj.hp - Env : DEV - Target ID : 3225 I tried connecting to the... (5 Replies)
Discussion started by: ROCK_PLSQL
5 Replies

3. Shell Programming and Scripting

Connect to FTP find files and export them to another server

Hi I'm trying to make script that will connect to FTP Server than find files that contain word HIGH in name and than export them to another server. Can anyone tell me if something like this is possible? Thanks :) (7 Replies)
Discussion started by: steve87bg
7 Replies

4. UNIX for Advanced & Expert Users

Public key to connect from one ftp server to other server

How to generate public key to connect from one ftp server to other server to use in scripting. (1 Reply)
Discussion started by: sridhardwh
1 Replies

5. Linux

Generate public key to connect from one ftp server to other server

How to generate public key to connect from one ftp server to other server to use in scripting. (0 Replies)
Discussion started by: sridhardwh
0 Replies

6. UNIX for Advanced & Expert Users

Unable to use FTP command to connect from one server to another

Hi, I have two unix servers A and B. from A i am trying to use the ftp command to connect to B but I am getting the "ftp: connect: A remote host refused an attempted connect operation." I checked the following things : 1.) Unix Server details for A and B after running the command uname -a... (3 Replies)
Discussion started by: mick_000
3 Replies

7. HP-UX

[Solved] Unable to rename file in ftp server .Net:FTP perl

Hello All, I am trying to connect to ftp server and get the files. Also i need to rename the file in other ftp dir. rename method is not allowing me to rename the file in other dir. When i tried copy command by using net::FTP:FILE then perl says it is not installed. Can some body help me to... (2 Replies)
Discussion started by: krsnadasa
2 Replies

8. Shell Programming and Scripting

How to connect to FTP server which requires SSL authentication?

Hello, I tried searching through lot of threads for a solution but couldn't fetch the exact solution, so I am creating a new thread. I am trying to connect to a FTP server 1) using a simple FTP command, it gives the error : 534 Policy requires SSL. Login failed. 2) using SFTP... (19 Replies)
Discussion started by: amitshete
19 Replies

9. AIX

ftp connect in passive mode , ftp settings

how to connect to ftp server in passive mode? ftp server.abc and how can i see ftp settings, doesn't exist some ftpd.conf there is some other file where i check the options and configurations of ftp server? Thanks (3 Replies)
Discussion started by: prpkrk
3 Replies

10. Shell Programming and Scripting

how to connect to a list of IP by ftp in shell script

Hi everyone, I have to maintenance an old script unix (#!bin/sh) that get files from remote host by ftp. There is a configuration file that contains a list of IP; the script reads this file, one line by line, and per each IP execute these commands: echo "verbose on" > ftprap.cmd echo "prompt... (3 Replies)
Discussion started by: molfrome
3 Replies
Login or Register to Ask a Question