- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- SFTP connection using a shell 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
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
тАО05-19-2006 11:30 PM
тАО05-19-2006 11:30 PM
SFTP connection using a shell script
************
ftp -nv << EOF
open $IP
user $USER $PASS
ascii
lcd $SOURCE
cd $DESTINATION
put $FILE
bye
EOF
echo "File transfered"
**************
I have the following questions:
1.) How can I do the same using now SFTP?
2.) How to disable auto-login?
3.) How to pass the user/pass to stfp through the shell script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2006 11:39 PM
тАО05-19-2006 11:39 PM
Re: SFTP connection using a shell script
2. If you are using hp ssh, it comes with tcp wrappers. Make use of /etc/hosts.deny file.
3. Same as 1. Set ssh/scp/sftp to password less authentication.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2006 09:16 PM
тАО05-27-2006 09:16 PM
Re: SFTP connection using a shell script
What I need is a shell script to use to send a file using SFTP that I can put it in cron. what I can't do now is having the script using the login/pass he got to connect automatically to the remote server.
I'm not familiar with this private and public keys stuff. Is that really needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2006 09:29 PM
тАО05-27-2006 09:29 PM
Re: SFTP connection using a shell script
If you're ftp'ing for example from one unix server to another unix server you can use scp aswell.
http://docs.hp.com/en/6073/FAQ-SSH.pdf
http://www.hpuxconsulting.com/5004.ppt#256,46,Slide 46
http://www.openssh.org/faq.html
Goodluck,
Darrel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2006 06:24 PM
тАО05-28-2006 06:24 PM
Re: SFTP connection using a shell script
#mget a file by using sftp--SAMPLE--
command='( sleep 1; echo '
command1='; sleep 1; echo mget
sftp username@
eval $s_command
s_command=$command$command1"> x_log 2>&1"
echo 'connecting to the server..'
rm ./x_log