Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have been trying to get an auto ftp shell script to work and for the life of me it won't work. I have googled a million differeent thinks and found many different scripts but none of the suggestions seem to work. The problem seems to be the Kerberos V4 that is installed on the version of Red Hat that i am using. I must add that the ftp does work manually it does give me the Kerberos error but i am able to input my user/pass information. The script i have is as follows:
user
pass
cd www
cd portfolio
binary
mput *.jpg
bye
Here is what i start to get for the output :
[root@wimax-host-a Backup]# bash ftpstartup
mkdir: cannot create directory `0525': File exists
cp: omitting directory `0525'
Please login with USER and PASS.
Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Password:Name (ftp.coe.neu.edu:root):
Login incorrect.
Login failed.
?Invalid command
?Invalid command
Please login with USER and PASS.
Please login with USER and PASS.
Please login with USER and PASS.
For some reason it seems to prompt for the password but ask for the username in that password. Some websites said to alter /etc/xinetd.d/gssftp and take out a -a but that did not work for me. Does anyone know my problem?
if anyone knows how i can use auto ftp to synchronize two folders that help would be greatly appreciated. I have it so that it connects to a folder now how do I sync that with a folder on my machine.
i solved the problem i tried a script i thought i had tried and it was successful
I am trying to ftp file from a Linux box to a NT Box and experiencing the very same problem. If both are Linux/Unix servers, i can use automate sftp process.
Hi, I have just read your post and it seems that you have tried some other script that it worked for you. Can I ask where you get it?!
Also, I have read up on setting a cron job as I need my ftp to be done on a regular basis. Any clues on how i can get the cron to execute the auto ftp script?
I am a newbie in linux/unix script programming. Please help. Really appreciate any form of clues.
rsync is indeed a better option for synchronization. It may be run through a ssh tunnel for security, if I'm not mistaken. wget can also be used to download any updates from the remote machine. When run on both sides, this too may synchronize the machines, but it may be a little tricky to set up.
As for the login issue, you may add the login credentials to your .netrc file (in your $HOME).
For some ftp clients, this automatically completes the login. See "man ftp" for details.
"expect", or more advanced scripting can also be used to catch the login questions.
Alternatively, you can also use command line utilities like ncftpput (for upload) and ncftpget or wget (for download). ncftp, ncftpget, ncftpput & wget all have options to supply the user credentials.
rsync is indeed a better option for synchronization. It may be run through a ssh tunnel for security, if I'm not mistaken. wget can also be used to download any updates from the remote machine.
I totally agree with Timmeke. You can just use your ssh keys for getting the authentication done.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.