LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 08-11-2006, 04:27 AM   #1
kmalla
LQ Newbie
 
Registered: Jun 2006
Posts: 14

Rep: Reputation: 0
How to connect to ftp using script


Hi all

I want to connect to remote machine i wrote .sh file
Given below

ftp -in <<EOF
open 172.17.3.75
user <username> <password>
bye
EOF

Now when i am running that i am getting folowing error

Please login with USER and PASS.
Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type

Can any one please help me out

Advance thanks regarding
 
Old 08-11-2006, 04:45 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
You've got some problem with the authentication. Can you ftp to the server in the ordinary fashion (run ftp, give username etc.)?

I tried the above script on a local server here, worked all right, I was able to get a file etc...

Seems you've (or the script) got a problem with kerberos

EDIT: I'd give a loot at the ftp configuration file if you've got one. Or contact the administrator of the server to find out if they have something special in the authentication..


#!/bin/sh
ftp -in <<EOF
open <server ip address>
user <username> <password>
get <filename>
bye
EOF

The above worked all right on me.

Last edited by b0uncer; 08-11-2006 at 04:47 AM.
 
Old 08-14-2006, 04:52 AM   #3
kmalla
LQ Newbie
 
Registered: Jun 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Hi,

Thank you for your reply.but that doesnt solved my problem.I am getting the same error

Please login with USER and PASS.
Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type

How to give the authentication.
 
Old 08-14-2006, 05:18 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Although it does look like Kerberos (or a setting) is the culprit, maybe this will help:

Quote:
#!/bin/bash
ftp -in <<EOF
open <server>
quote user <user>
quote pass <password>
..
..
bye
EOF
Hope this helps.
 
Old 08-15-2006, 07:03 AM   #5
kmalla
LQ Newbie
 
Registered: Jun 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Hi,

I am getting the same error.
Can you suggest alternative....
 
Old 08-15-2006, 09:12 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Nope, no alternative advise.
I can just repeat what b0uncer already suggested: Ask the administrator how things are set up and if this is possible with the current kerberos implementation.
 
Old 08-15-2006, 09:59 AM   #7
kmalla
LQ Newbie
 
Registered: Jun 2006
Posts: 14

Original Poster
Rep: Reputation: 0
In one site it was suggested to turn off the KERBEROS authentication.How can we do that.Can any one suggest
 
Old 08-15-2006, 10:33 AM   #8
westb
LQ Newbie
 
Registered: Jul 2006
Location: Ontario, Canada
Distribution: RHEL4 AMD64, x86
Posts: 2

Rep: Reputation: 0
Does your password have special characters in it ? If so, try changing it to something else and try it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Urgent Help: Perl FTP Script Using NET::FTP xboxter Programming 8 05-16-2005 06:57 PM
Can't connect to ftp through network. chavo Linux - Networking 0 11-19-2004 10:58 AM
how to connect ftp... monojit_18 Linux - Software 2 10-03-2004 05:16 PM
Cant connect to my ftp from the outside deep9 Linux - Networking 3 04-19-2004 05:22 AM
ftp - not able to connect chapzilla Linux - Newbie 1 07-29-2003 06:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 05:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration