Re: How to foce SCP to create a directory ?????????????



On Tue, Sep 11, 2007 at 06:23:36AM -0700, gerry.brennan@xxxxxxxxx wrote:
On 10 Sep, 19:55, Nico <nka...@xxxxxxxxx> wrote:
On 10 Sep, 14:57, gerry.bren...@xxxxxxxxx wrote:

Is there a way to force scp to create a directory if it does not exist
when copying a file remotely

scp -o stricthostkeychecking=no -oCiphers=aes128-cbc ~/.ssh/
authorized_keys ring1@$hostname:~/.ssh/authorized_keys

gerb

I think you should either send a preliminary "mkdir" command, or use
rsync something like this:

rsync -avv --include=authorized_keys -e 'ssh -o
stricthostkeychecking=no -oCiphers=aes128-cbc' ~/.ssh/ ring1@
$hostname:.ssh/

rsync is not available on the machine


Just cat it thought ssh...

cat ~/.ssh/authorized_keys | ssh ring1@$hostname "mkdir -m 0700 -p \
..ssh && cat - >> .ssh/authorized_keys && chmod 0622 \
..ssh/authorized_keys"

--
Martin
.



Relevant Pages

  • RE: redhat-list digest, Vol 1 #8511 - 29 msgs
    ... To subscribe or unsubscribe via the World Wide Web, ... Command running on terminal at some intervals (Reuben D. ... Re: bash shell ... rsync with public/private keys/no passwords ...
    (RedHat)
  • RE: redhat-list digest, Vol 1 #8511 - 29 msgs
    ... To subscribe or unsubscribe via the World Wide Web, ... Command running on terminal at some intervals (Reuben D. ... Re: bash shell ... rsync with public/private keys/no passwords ...
    (RedHat)
  • Re: sending selected files to remote machine (NOT an incremental backup!)
    ... I DON'T mean an incremental backup! ... A single command can combine multiple commands into a single executable ... > Why not use rsync? ...
    (comp.os.linux.misc)
  • Re: Copy with SCP - low performance
    ... >>I have found thet SCP does not like lots of small files, if you can tar ... If you don't have the rsync command available, you can install it from the ...
    (Fedora)
  • Re: Killed /home installing Fedora 7 with Ubuntu
    ... This is an rsync command that my wife and I both use on our laptops ... This command will be all on one line and it will delete files that do ... not exist on the local machine, that is if I delete a file from my ... that once deleted you cannot recover a file. ...
    (Fedora)