.ssh/: Is a directory

Darren Tucker dtucker at zip.com.au
Thu Jan 1 15:57:38 EST 2004


Dan Kaminsky wrote:
> Try adding -r (or -rf) to scp.  I'm unclear on why scp should be making 
> a directory at all, considering you're not copying the directory but the 
> files inside.

It's not.  scp calls ssh which creates the directory.  So:
1) scp checks if .ssh is a directory, which it's not since it doesn't 
exist so scp assumes .ssh is a file
2) scp starts ssh
3) ssh notices .ssh doesn't exist, creates it.
4) scp copies file from remote, tries to write to a file ".ssh", which 
now exists and is a directory.

I guess you could set targisdir if the target ends in "/" like the 
attached ?

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
     Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: openbsd-scp-targetdir.patch
Url: http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20040101/e09baeeb/attachment.ksh 


More information about the openssh-unix-dev mailing list