Bourne Shell SSH/FTP
- From: Kerrangster <kerrangster@xxxxxxxxx>
- Date: Sat, 13 Sep 2008 10:39:52 -0700 (PDT)
In a Bourne shell script, I'd like to use ssh to execute a command on
a remote host. The command I'd like to execute is a FTP command.
Here's what I'd like to do:
#
# scp a file to the host so it's there
#
scp file username@host /directory/file
#
# Using ssh, ftp the file from the host to host2
#
ssh username@host <<SSH
cd /some-directory
ftp username@host2 <<FTP
put filename
FTP_END
#
# Remove the file from host (clean up work)
#
SSH_END
continue to do some clean-up
end the script
I know this is possible, but is there information on this somewhere?
I'm just guessing about all this. I know it works, but there are
things that don't work, and I don't know why? For example, after the
SSH_END nothing else in the script will run, and I don't know why?
.
- Follow-Ups:
- Re: Bourne Shell SSH/FTP
- From: Anonymous
- Re: Bourne Shell SSH/FTP
- Prev by Date: Re: Solaris 10, PuTTY, and vi
- Next by Date: Re: Offending line of code missing from sigaction handler
- Previous by thread: ipqos doesn't work if interface name is given in filter
- Next by thread: Re: Bourne Shell SSH/FTP
- Index(es):
Relevant Pages
|