- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Automating an sftp session
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
11-28-2005 01:19 AM
11-28-2005 01:19 AM
How do I avoid entering the password interactively when using sftp to transfer files?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2005 01:23 AM
11-28-2005 01:23 AM
Re: Automating an sftp session
http://www.cvrti.utah.edu/~dustman/no-more-pw-ssh/
And here's some info on HP secure shell:
http://docs.hp.com/en/T1471-90011/ch01s10.html
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2005 01:52 AM
11-28-2005 01:52 AM
Re: Automating an sftp session
What I started with:
ftp -i -nv
user
ls
bye
EOF
What I ended up with:
sftp user@
get
put
ls
bye
EOF
This has the disadvantage of having to hardcode the password in the script. It can be ehanced to read it from a more secure location.
I recommend scp
Its part of scp.
If you exchange public keys between servers it works like this:
scp
ex:
scp /etc/issue root@servername:/etc
One of these two docs will tell you how to do public key exchange:
http://www.hpuxconsulting.com/5003.ppt
http://www.hpuxconsulting.com/5004.ppt
I forget which and don't have time to check.
SEP
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
11-29-2005 12:01 AM
11-29-2005 12:01 AM
Re: Automating an sftp session
I tried the method below but that doesn't work - I still get a password prompt.
sftp user@
get
put
ls
bye
EOF
Looks as if you can't hardcode your password into an sftp script!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2005 03:10 AM
11-29-2005 03:10 AM
Solutionyou can generate a key pair on local host.
then you put your one line public key on .ssh/authorized_keys on remote host
be aware however that distant admin must uncomment lines in /etc/ssh/config_sshd
#RSAAuthentication yes
#PubkeyAuthentication yes
some admin wouldn't allow a ssh without keys, however as you are willing to establish a password less connection at first place....
If you feel this is doable, let us know I'll gave further instructions
Jean-Yves
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2006 11:00 PM
01-03-2006 11:00 PM