- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ftp a file to local system
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
Discussions
Discussions
Discussions
Forums
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
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
тАО10-23-2008 12:22 AM
тАО10-23-2008 12:22 AM
Could you please give me a solution to ftp a file from a unix box to my local desktop ?
Through command prompt I am able to transfer the files.But I need to do in unix script.
Regards
Muktha
Solved! Go to Solution.
- Tags:
- ftp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2008 12:37 AM
тАО10-23-2008 12:37 AM
Re: ftp a file to local system
Hi Muktha,
>from a unix box to my local desktop ?
which OS is running in your desktop ,you should have ftp server configured on your laptop for doing this.
Aneesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2008 12:43 AM
тАО10-23-2008 12:43 AM
Re: ftp a file to local system
(Insert standard caveats about security hole here.)
ftp -n machine <
cd directory
lcd local-directory
put file
bye
EOF
Other threads you can check. You may want perl?
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1200955
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=957044
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=811436
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=808799
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=24873
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=86190
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2008 12:57 AM
тАО10-23-2008 12:57 AM
SolutionThe unix box can command the FTP transfer only if there is a FTP *server* on your desktop.
Unix machines usually have both the client and the server installed, but in Windows desktops, there is usually no server, just a client. In this situation, the desktop can both "push" and "pull" files to/from the unix box, but the unix box cannot connect the desktop and start a transfer in either direction.
The Windows command-line FTP client may be scriptable using .BAT or .CMD files. But that does not belong to a HP-UX forum section...
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2008 01:38 AM
тАО10-23-2008 01:38 AM
Re: ftp a file to local system
Thank you very much Matti.
I was not aware of this.Thanks for the datailed explanation.
Now I am trying for any other method to do the same.
Could you please help me?
Regards
Muktha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2008 03:06 AM
тАО10-23-2008 03:06 AM
Re: ftp a file to local system
For FTP you need to download an FTP server such as FileZilla which you can find at http://filezilla-project.org/ and install on your PC.
The same can be said for SSH. An example of an SSH server is WinSSHD which you can find at http://www.bitvise.com/download-area
Do a google search and you'll find many FTP/SSH server applications out there.
Whether you run an FTP or SSH server on your PC you'll have some setup to do including setup a userid / password with which to connect. As well as specify the folder on your PC which the userid has permissions to receive files.
The SSH setup will involve generating keys to grant the unix user rights to access the SSH server running on your PC.
The SSH setup is more involved but is more secure and what I'd recommend.
Check with your IT security team and see whether running an FTP/SSH server on your PC is allowed.
For scripting using SSH I find easier. As you use the command SCP to transfer the files.
scp /path/to/file/on/UX username@pcname
This will upload a file from the UX server to the PC to the directory pre-defined for that user in the SSH server software.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2008 04:16 AM
тАО10-23-2008 04:16 AM
Re: ftp a file to local system
If you don't want to implement a secure FTP like WinSCP:
http://winscp.net/eng/index.php
...then I could strongly consider using a 'netrc' based FTP (rather than bury passwords in scripts) or better yet, implement a SSH SFTP script using public keys.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2009 10:56 AM
тАО01-12-2009 10:56 AM
Re: ftp a file to local system
ftp://ftp.3com.com/pub/utilbin/win32/3cs117.zip
Install it, define a user and set it up as a server.
Then in your script I prefer using expect
If you have expect installed
Fill in the REALIP, username,password, directory, filename
#!/usr/local/bin/expect --
spawn ftp
expect "Login:"
send "username\r"
expect "password:"
send "password\r"
expect "ftp> "
send "prompt\r"
expect "ftp> "
send "cd destination\r"
expect "ftp> "
send "ascii\r"
expect "ftp> "
send "get filename\r"
expect "ftp> "
send "quit\r"