- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: sftp - a better way to script?
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
01-12-2007 06:09 AM
01-12-2007 06:09 AM
sftp - a better way to script?
Has anyone come up with a better way to script sftp transfers from HPUX? A better sftp tool running on HPUX perhaps?
Does anyone have example perl code I use as a base to get started?
Other suggestions?
Thanks very much in advance,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2007 06:15 AM
01-12-2007 06:15 AM
Re: sftp - a better way to script?
- Tags:
- Perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2007 06:37 AM
01-12-2007 06:37 AM
Re: sftp - a better way to script?
Another option would be lftp, which can open sftp sessions and is supposed to be reasonably script-friendly. I haven't used it on HP-UX so I don't know if it has any issues.
Net::SFTP would be the appropriate perl module, not Net::FTP. I've never used it, so I can't comment on how well it works.
- Tags:
- scp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2007 06:56 AM
01-12-2007 06:56 AM
Re: sftp - a better way to script?
Sorry, I read too fast! CPAN has an 'sftp' module, 'Net::SFTP':
http://search.cpan.org/~dbrobins/Net-SFTP-0.10/lib/Net/SFTP.pm
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2007 07:01 AM
01-12-2007 07:01 AM
Re: sftp - a better way to script?
Then no need to worry about passwords....
Example shell script:
#!/bin/sh
#### script to transfer .csv files over to Comapny INTL ####
### contact John Doe for Help ###
## script Written by Me ##
set -xv
cd /export/APPL/xxx/outbound
cp -r * ../backup
for i in `ls -1 pctcp*.csv` ; do echo $i ; fname=`echo $i | awk -F. '{print $1}'` ; echo $fname ; mv $i $fname.txt ; done
sftp -b /export/APPL/xxx/batchscript auserid@sftp.somewhers.ca
pwd
mv * /export/APPL/xxx/archive
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2007 08:19 AM
01-12-2007 08:19 AM
Re: sftp - a better way to script?
Geoff, I don't know why, but I can't get the keys to work on the "other guy's" machine. I don't know if he can't set something up right, etc. I have no problem using it here across many different platforms, but I'm not the admin on their box, and I can't get them to want to fix their problem badly enough (I guess).
Thanks all, any more ideas greatly appreciated.
Anyone familiar with using a product called "sftpplus" by ProAtria?