[CLUE-Tech] Problems with FTP over SSH
Nate Duehr
nate at natetech.com
Fri Sep 3 20:04:26 MDT 2004
On Sep 3, 2004, at 3:03 PM, Angelo Bertolli wrote:
> Nate Duehr wrote:
>
>>
>> On Sep 3, 2004, at 2:24 PM, mike havlicek wrote:
>>
>>> This is probably stupid, but what about sftp?
>>> -Mike
>>>
>> Or its granddaddy, scp? ;-)
>
> I love scp. I don't know why scp isn't more popular... it's a lot
> faster to type a single command line to copy stuff over securely than
> to take so many steps with ftp programs.
Yeah, especially if you're using passwordless (keys) ssh - it's the
only way to fly.
Shell scripts like :
#!/bin/bash
ssh username at machine$NUM.blah.com mkdir /opt/coolscript
scp <coolscript>.sh username at machine$NUM.blah.com:/opt/coolscript/
`ssh username at machine$NUM.blah.com /opt/coolscript/<coolscript>.sh` >
machine$NUM.output
And looping it through your entire farm -- makes "work" go by sooo much
quicker. Heck even if you have to type the password it isn't "too"
bad. Brute force sometimes makes me happy... I'll admit it. ;-)
Running across that "one legacy machine" that has some old cruddy OS on
it and no ssh always is annoying once you've lived with the above
setup.
(And yeah, I know there's even easier ways to do it and error
correction/catching in that example sucks rocks... but just to get
something DONE in a few minutes what might take hours -- or worse,
require one to learn Expect... heh heh... just kidding... is a great
benefit.)
I saw where someone had a package that basically did the above but
handled building the keys and also just prompted you for the commands
you wanted to run remotely... but I can't remember what it was called.
Pretty neat stuff.
--
Nate Duehr, nate at natetech.com - WY0X
More information about the clue-tech
mailing list