- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- SFTP script
Operating System - HP-UX
1824189
Members
5173
Online
109669
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
Forums
Discussions
юдл
back
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
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО06-01-2005 02:26 PM
тАО06-01-2005 02:26 PM
SFTP script
I am trying to write a automated sftp script. Does any one have one. i will use key instead of password.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2005 02:59 PM
тАО06-01-2005 02:59 PM
Re: SFTP script
You can put your commands in a batch file and run sftp with -b option.
-b batchfile
Batch mode reads a series of commands from an input batchfile
instead of stdin. Since it lacks user interaction it should be
used in conjunction with non-interactive authentication. A
batchfile of `-' may be used to indicate standard input. sftp
will abort if any of the following commands fail: get, put,
rename, ln, rm, mkdir, chdir, ls, lchdir, chmod, chown, chgrp,
lpwd and lmkdir. Termination on error can be suppressed on a
command by command basis by prefixing the command with a `-'
character (for example, -rm /tmp/blah* ).
-b batchfile
Batch mode reads a series of commands from an input batchfile
instead of stdin. Since it lacks user interaction it should be
used in conjunction with non-interactive authentication. A
batchfile of `-' may be used to indicate standard input. sftp
will abort if any of the following commands fail: get, put,
rename, ln, rm, mkdir, chdir, ls, lchdir, chmod, chown, chgrp,
lpwd and lmkdir. Termination on error can be suppressed on a
command by command basis by prefixing the command with a `-'
character (for example, -rm /tmp/blah* ).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2005 03:34 PM
тАО06-01-2005 03:34 PM
Re: SFTP script
I want to know details about sftp. how it works. how can i program through it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2005 04:25 PM
тАО06-01-2005 04:25 PM
Re: SFTP script
sftp is secure ftp.
It is part of the openssh package and does authentication and sessions encrypted. This makes it a secure replacement for ftp.
Hence the Name.
You have some nice options though.
You can set up password free sftp or use a slightly modified ftp script. Password free is more secure, because it uses public key exchange. A sftp or ftp script normally involves a password in a script.
Here is a typical ftp script.
ftp -nv 10.201.10.1 </tmp/get_logftp01.$$
user ${USER}${PASS}
cd${COLLECT}
get${FILE1}
bye
FTPEOF
The SFTP script would look like this:
sftp username@10.201.10.1 </tmp/get_logftp01.$$
user ${USER}${PASS}
cd${COLLECT}
get${FILE1}
bye
FTPEOF
Note that in this example the username, passwrd cd directory and file information input into variables prior to the script snippet. This baby also creates a log file.
Now, if you want to learn about exchanging public keys, you can read this Chris Vail document(attached) or attend a seminar I'm giving at HP World in San Francisco August 14-18.
SEP
Contact form that mail's me offline:
http://www.isnamerica.com/contactsep.shtml
Please enter text telling me WHY you are using this contact form.
Thanks.
It is part of the openssh package and does authentication and sessions encrypted. This makes it a secure replacement for ftp.
Hence the Name.
You have some nice options though.
You can set up password free sftp or use a slightly modified ftp script. Password free is more secure, because it uses public key exchange. A sftp or ftp script normally involves a password in a script.
Here is a typical ftp script.
ftp -nv 10.201.10.1 <
user ${USER}${PASS}
cd${COLLECT}
get${FILE1}
bye
FTPEOF
The SFTP script would look like this:
sftp username@10.201.10.1 <
user ${USER}${PASS}
cd${COLLECT}
get${FILE1}
bye
FTPEOF
Note that in this example the username, passwrd cd directory and file information input into variables prior to the script snippet. This baby also creates a log file.
Now, if you want to learn about exchanging public keys, you can read this Chris Vail document(attached) or attend a seminar I'm giving at HP World in San Francisco August 14-18.
SEP
Contact form that mail's me offline:
http://www.isnamerica.com/contactsep.shtml
Please enter text telling me WHY you are using this contact form.
Thanks.
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP