![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to execute script from my desktop windows xp to my HPUX server? | kenshinhimura | HP-UX | 2 | 03-05-2008 05:47 PM |
| Script runs fine on UNIX Server...Not through MSK Tool kit on Windows Server | madhunk | UNIX for Dummies Questions & Answers | 5 | 01-31-2008 01:30 PM |
| how to move a file from one server to another server using FTP in shell script? | forevercalz | Shell Programming and Scripting | 4 | 10-27-2005 01:53 AM |
| If a is windows gui ( client), b is a unix gui ( Server for a) and c is a shell scrip | hchivukula | UNIX for Dummies Questions & Answers | 1 | 06-12-2005 08:34 AM |
| How to execute a shell script from Windows | kyawlin | UNIX for Dummies Questions & Answers | 4 | 12-19-2003 09:54 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Shell Script to ftp from windows server
Hello All,
I've to write a shell script to transfer some files to/from windows server. I can put & get files simply by doing ftp but need to automate this. So I tried for this -. HOST=.hostname USER='username' PASSWD='***' ftp -n $HOST <<END_SCRIPT quote USER $USER quote PASS $PASSWD mput new* quit END_SCRIPT as per search on this topic. But I'm getting the error : 'AUTH GSSAPI': command not understood 'AUTH KERBEROS_V4': command not understood KERBEROS_V4 rejected as an authentication type User ced-aswhec-ftp cannot log in. mput new.sh? Please login with USER and PASS. Passive mode refused. Turning off passive mode. Please login with USER and PASS. ftp: bind: Address already in use mput newest.sh? Please login with USER and PASS. mput newestt.sh? Please login with USER and PASS. Does anyone have idea what exactly it mean? It's not accepting the valid username & password provided. Even let me know where the .netrc comes in picture... Thanks in advance. - Ships |
|
||||
|
Put the user and password in your $HOME/.netrc file.
Code:
machine hostnameofmachine login username password passwordstring Code:
chmod 0600 $HOME/.netrc |
|
||||
|
Thanks Porter, for the valuable suggestion. Got to know the concept n use of .netrc file.
But still i'm getting the same error. Is there anything that need to add to my script code for making the script to use the .netrc file or by default it looks into that only? Regards, Shilpa |
|
||||
|
Quote:
Code:
ls -ld $HOME/.netrc post exactly what you are doing and results (we should now not see anything about username/password). what system are you using? post result of "uname -a" |
|
||||
|
Yeah, Porter,
The system I'm using is GNU/Linux & the code now goes like : Quote:
-rw------- i.e.as per the "chmod 0600 $HOME/.netrc" mentioned by u. The result is as : Code:
'AUTH GSSAPI': command not understood 'AUTH KERBEROS_V4': command not understood KERBEROS_V4 rejected as an authentication type User ced-aswhec-ftp cannot log in. Login failed. Interactive mode off. Please login with USER and PASS. Passive mode refused. Turning off passive mode. Please login with USER and PASS. ftp: bind: Address already in use Quote:
But came up with same result. Thanks n Regards, Shilpa |
|
||||
|
You should just be able to do
Code:
ftp server-name Yes the attributes of $HOME/.netrc look right. When it fails, is it printing the name of the user as read from $HOME/.netrc. Don't use "-n", this disables the auto-login. |
![]() |
| Bookmarks |
| Tags |
| linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|