Single line sftp upload

Steve Flynn anothermindbomb at gmail.com
Tue Oct 23 19:12:08 UTC 2012


On 23 October 2012 19:59, Oliver Marshall <oliver.marshall at g2support.com>wrote:


> Really its a limitation of our management tool when it runs under linux.
> It has problems with things like the ftp command where it requires the
> commands to be in a text file. It's easier for us to have everything on one
> line, the host, username, password, file source and destination. I used to
> use gftp but for various reasons I can't in this instance.
>

I see. Would it be acceptable to have the commands to upload the file in a
here document, as in:

sftp user at 1.2.3.4 << ALL_DONE
I_cant_believe_you're_still_using_passwords!
lcd my_local_directory
cd /remote_directory/
put myfile their_file
bye
ALL_DONE

?

I'm assuming this also causes some issues for your environment, but to be
honest, I can't think of an sftp client which can do what you require...
mind you, I've only really spent any time with sftp as I've never had to
work under the restrictions you have.

-- 
Steve

When one person suffers from a delusion it is insanity. When many people
suffer from a delusion it is called religion.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20121023/32f85b9d/attachment.html>


More information about the ubuntu-users mailing list