- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Scripting sftp with password authentication
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
тАО03-18-2008 10:20 PM
тАО03-18-2008 10:20 PM
The remote server is not ours and we would prefer to solve this without further involving the other party if at all possible.
But every attempt I've made, reading and following various other articles in this forum, has failed. I've run it with debugging on and if -b or BatchMode Yes is given, no attempt is made to read the password from stdin or the batch file. It appears that authentication must complete before the batch file or stdin is read for commands.
Is that the final word? Is there no way to non-interactively supply a password?
This is HP-UX 11.11
SSH is " T1471AA A.04.30.002 HP-UX Secure Shell"
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2008 02:30 AM
тАО03-19-2008 02:30 AM
Re: Scripting sftp with password authentication
You did not say if this is your server or the other party's server or both.
> without further involving the other party if at all possible.
Why don't you get this working within your own environment? You have sftp and it should be easy to find an sshd specially if the above mentioned HP-UX environment is yours.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2008 05:31 AM
тАО03-19-2008 05:31 AM
SolutionYou have to install expect from the porting and archive centre.
The configure a simple expect script that waits for the login prompt, sends the username,
waits for the password prompt, sends the password,
then has a line at the end which says Interact.
You then create a shell script which runs sftp in batch mode with expect. I dont have an example here, but I did make it work previously.
By the way, a better method than this is to send your key into the remote .ssh directory, so that it logs in using keys and does not request a password.
As the previous post said, this doesnt always work with different ssh versions (e.g. HP-UX /windows didnt work for me so I had to use expect).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2008 06:13 AM
тАО03-19-2008 06:13 AM
Re: Scripting sftp with password authentication
http://linux-bsd-central.com/index.php/content/view/26/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2008 07:30 AM
тАО03-19-2008 07:30 AM
Re: Scripting sftp with password authentication
The information about expect may be useful if they're unwilling to install our public key files. Thanks everybody.