HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- SFTP Scripts
Operating System - HP-UX
1825729
Members
2766
Online
109687
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
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
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
09-12-2004 04:22 PM
09-12-2004 04:22 PM
Hi All,
I am running SFTP using expect script below :
#!/usr/local/bin/expect
spawn sftp -b batchFile@
expect "password:"
send "\n";
interact
I have an issue on above script as the password need to be hard-coded in the script.
Is there any other way how to prevent it? Or How can we translate the script to another methods such as perl or C or shell, so I can avoid hard-code password?
I just want to mitigate the security risk because of hard-coded password.
Pls help. High score will be given.
Thanks and Best Regards,
Negara
I am running SFTP using expect script below :
#!/usr/local/bin/expect
spawn sftp -b batchFile
expect "password:"
send "
interact
I have an issue on above script as the password need to be hard-coded in the script.
Is there any other way how to prevent it? Or How can we translate the script to another methods such as perl or C or shell, so I can avoid hard-code password?
I just want to mitigate the security risk because of hard-coded password.
Pls help. High score will be given.
Thanks and Best Regards,
Negara
Santos
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2004 04:29 PM
09-12-2004 04:29 PM
Solution
sftp comes with another nice little product.
Its called scp
if you exchange public keys, you can scp a file from server to server with no risk. This also applies to Linux and other flavors of Unix running openssh.
I am attaching a word doc on how to exchange public keys. Its easy. You don't need X, you can do it with cat.
Do pay attention to the directory permissions.
SEP
Its called scp
if you exchange public keys, you can scp a file from server to server with no risk. This also applies to Linux and other flavors of Unix running openssh.
I am attaching a word doc on how to exchange public keys. Its easy. You don't need X, you can do it with cat.
Do pay attention to the directory permissions.
SEP
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2004 05:04 PM
09-12-2004 05:04 PM
Re: SFTP Scripts
Steven,
Thanks alot.
Actually for now I do not prefer to use public/private keys because of company's policy reasons. My customer is requesting to run SFTP in batch file without generating public/private keys. One of the solution is using expect script above, but it is needed to had-code the password in the script. Any idea?
Thanks alot.
Best Regards,
Negara
Thanks alot.
Actually for now I do not prefer to use public/private keys because of company's policy reasons. My customer is requesting to run SFTP in batch file without generating public/private keys. One of the solution is using expect script above, but it is needed to had-code the password in the script. Any idea?
Thanks alot.
Best Regards,
Negara
Santos
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
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP