- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- FTP from UNIX to MS server
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2001 06:36 AM
03-09-2001 06:36 AM
I need a script to do this. When I do this interactively it works fine.
My script gets stuck in the login.
I wount to have this script simple.
Connect, Login, send the files, and logout.
I have never done this before with FTP cant be heard.
I tryed
ftp <
username
password
EOF
It gets stuck on the login.
Can you help?
Marty
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2001 06:43 AM
03-09-2001 06:43 AM
Re: FTP from UNIX to MS server
you need to use .netrc for authentication or
use the user-command in your script. Goes:
ftp <
user username password
...do the rest ...
EOF
Hope this helps
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2001 06:51 AM
03-09-2001 06:51 AM
Re: FTP from UNIX to MS server
Change 'ftp << EOF' to 'ftp -n << EOF' and try your script.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2001 08:14 AM
03-09-2001 08:14 AM
Re: FTP from UNIX to MS server
My Script looks like this:
$ cat test_ftp.sh
ftp <
open ABC
user image xyz123
EOF
This is what I get
$ ./test_ftp.sh
Verbose mode on.
Connected to ABC.
220 abc Microsoft FTP Service (Version 2.0).
Name (ABC:image): 331 Password required for user image xyz123.
Password:
I think I am missing some thing.
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2001 08:49 AM
03-09-2001 08:49 AM
SolutionJames is right, you need to provide -n
-n Do not attempt "auto-login" upon initial connec-
tion. If auto-login is not disabled, ftp checks
the .netrc file in the user's home directory for
an entry describing an account on the remote
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2001 08:50 AM
03-09-2001 08:50 AM
Re: FTP from UNIX to MS server
Try this
ftp -n -v -i
user
transfer files
quit
EOD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2001 08:57 AM
03-09-2001 08:57 AM
Re: FTP from UNIX to MS server
The following (with the -n option works):
#!/usr/bin/sh
ftp -n << EOF
verbose
open thehost
user uuu ppp
get /tmp/stuff
close
EOF
Without the -n option, as below, fails:
#!/usr/bin/sh
ftp << EOF
verbose
open thehost
user uuu ppp
get /tmp/stuff
close
EOF
This hangs looking like:
Name (thehost:uuu): 331 Password required for user uuu ppp.
Password:
Regards!
...JRF...