ftp: Name or service not known


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ftp: Name or service not known
# 1  
Old 05-03-2011
Hammer & Screwdriver ftp: Name or service not known

Hi All,

I'm a new user. When I try to use ftp in a script, its throwing the below error "ftp: Name or service not known".

what could be the issue??? Pls help.Smilie
# 2  
Old 05-03-2011
Please show us your script - the part with the problems.
# 3  
Old 05-03-2011
Halo jim mcnamara,

Pls find the script below.

Code:
HOST=XXXX
USER='USER'
PASSWD='PWD'
PATH=file/bak
ftp -n -i $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
cd $PATH
get file_name
bye
END_SCRIPT

Thanks in Advance....

Last edited by Franklin52; 05-04-2011 at 03:30 AM.. Reason: Please use code tags
# 4  
Old 05-03-2011
1. can you ping your remote host
Code:
# XXXX is not the real hostname
ping XXXX

2. If #1 worked can you telnet to port 21 on the remote box?
Code:
telnet XXXX 21

IF you get something like this
Code:
Trying 10.128.3.251...
Connected to 10.128.3.251.
Escape character is '^]'.

it worked. Let us know.
This User Gave Thanks to jim mcnamara For This Post:
# 5  
Old 05-03-2011
Thanks a lot for your quick revert.

The thing is, I'm able to ping/ ftp to HOST normally.

But inside the script, its not working.

Kindly Suggest.
# 6  
Old 05-04-2011
$PATH is a reserved variable in Shell. Use another name for the variable!

By changing the value of $PATH you have stopped your script from being able to find "ftp" ... or for that matter any program which is not in "file/bak".
# 7  
Old 05-05-2011
Dear Methyl,

I changed the variable name and even then No Go......
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

To stop ftp service on VIO

Hi all, How can I close ftp port 21 on VIO server. Best regards, ---------- Post updated at 10:06 AM ---------- Previous update was at 08:45 AM ---------- I resoved with switch to OS mode. $ oem_setup_env (0 Replies)
Discussion started by: getrue
0 Replies

2. HP-UX

FTP service Enable/Disable

hi everybody, I can easily enable /disable the FTP service from SAM, how can I do this via command line? using inetd? how? cheers, messi (1 Reply)
Discussion started by: messi777
1 Replies

3. UNIX for Dummies Questions & Answers

FTP service/ set up

Hi Everybody, How can I understand when I login to any unix server that this server is having ftp service running? what I care is that I want to ftp something to this server and I can't, something like connection refuse. is there any ways to understand if the ftp is setup? and if not, how to set... (2 Replies)
Discussion started by: messi777
2 Replies

4. AIX

Block users ftp service

Hello everyone I create a file /etc/ftpusers to block users. I put the names of the users and I refresh the service inetd. My question is the user still log in by ftp.???? What I miss Thanks for your opinions. Greetings (2 Replies)
Discussion started by: lo-lp-kl
2 Replies

5. Linux

Setting up FTP service +on Fedora 9

Hi all, I set up FTP service at my linuxAbox. Everything is good. When i did FTP from my LinuxB box , it authenticated just fine. The problem is: 1. I can't list the directory 2. when i use ls command to list the directory, it showed: 227 Entering passive mode... (2 Replies)
Discussion started by: c00kie88
2 Replies

6. UNIX for Dummies Questions & Answers

FTP service..please help me

could you please guys and gals to educate me about the ftp...implementation and how to use it on BSD? thanks a lot (2 Replies)
Discussion started by: lipbalm
2 Replies

7. Linux

Ftp Service /process Status

:confused: Hi Can anyone tell me how to check the FTP process status in linux . eg,I'm ftpping some files from "A" server to "B" server through FTP command , after ftpping these files , I 'm suppose to delete the files which are successfully ftpped from "A" server ,but when I 'm checking the... (1 Reply)
Discussion started by: GaneshB
1 Replies

8. Linux

Better FTP service needed. (suspected inteferance)

Hello there, I have of recent been having overbearing problems with my Linux computer when accessing servers via FTP. The server behaves rather erractically and refuses to complete uploads, merely stalling the transfer for an unpredictable amount of time, which can stem from being either 5... (2 Replies)
Discussion started by: Noran Rad
2 Replies

9. AIX

Unix security -- FTP service????

I would like to ask for you suggestions or comments see if you can help. Since system auditing is under progress and the AIX is the main investigated unit. They are asking to disable the FTP service to enhance the security but I doubt. For daily use, the FTP will help administrator to download... (1 Reply)
Discussion started by: shanemcmahon
1 Replies

10. UNIX for Dummies Questions & Answers

ftp: ftp/tcp: unknown service

Hello, when I type ftp on the server (Sco Unix 5.0.4) it gives an error messages which is "ftp: ftp/tcp: unknown service" but I have this service in '/etc/services' file. Also when I want to telnet from another machine to this machine is gives also 'telnet: tcp/telnet: unknown service' this... (2 Replies)
Discussion started by: alisevA3
2 Replies
Login or Register to Ask a Question