Re: scripting sftp transfers
From: schranen (schranen_at_yahoo.com)
Date: 10/30/04
- Previous message: Adam Price: "Re: SHELL Dependency between scripts??"
- In reply to: David Kirkby: "Re: scripting sftp transfers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 30 Oct 2004 22:23:23 +0200
hi david,
thanks, i havent heard of "expect" but will give it a try. the reason
because i cant use public key auth. is that we dont have any write
access at all on the server side. i also would prefer other ways than
plaintext passwords :(
greets,
schranen
David Kirkby wrote:
> schranen wrote:
>
>> hi,
>>
>> sorry if i am in the wrong NG, but c.u.s looks much more appropriate
>> than the ssh group. to the problem: i try to do file transfers over
>> sftp via cron. the problem is the part when it comes to
>> authentication, it wont accept any passed passwords ( sftp seems to
>> lack the -n parameter?) unfortunately key-authentication
>> (~/.ssh/authorized_hosts) is no option. is there a way to do it like
>> standard ftp, which currently works at my server like this:
>>
>> #!/bin/sh
>> ftp -i -n << !EOF
>> open 10.145.0.1
>> user ftp datafetch@localhost
>> cd /opt/data
>> bin
>> gate data_latest.csv
>> bye
>> !EOF
>>
>> excuse my bad english & tia,
>> schranen
>
> There is a program called 'expect' which I have never used, but belive
> it will do what you want. I have it on my system, but don't have a man
> page for some reason. But here is the usage info
>
> usage: expect [-div] [-c cmds] [[-f] cmdfile] [args]
>
> Why are you unable to use key-authentification? It seems the most
> obvious way to do it. You will have to have a key with a null passphrase
> (which is a security risk, but one i choose to take on some machines),
> but then storing plain text passwords is just as much, if not more so of
> a risk.
>
> sparrow /export/home/drkirkby % scp foobar drkirkby@webserver2:/tmp
> foobar *********... 100%
>
>
- Previous message: Adam Price: "Re: SHELL Dependency between scripts??"
- In reply to: David Kirkby: "Re: scripting sftp transfers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|