.ssh/: Is a directory

Zeffie zeffielist at ecio.net
Fri Jan 2 01:44:27 EST 2004

> 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)

Unfortunately this is often something that is out of my control and I would
have to make a choice between installing my version of ssh or running the
command twice which is much faster.  I thought I saw somewhere that it was
important to specify the "/" at the end but I can't find the resource now.
This is what lead me to think the mesage was strange as I had already
specified it as a directory.  It does seem strange to me that it expcets to
write a file, and even with the -r it's making a decission about what the
destination will be before it has connected with what should be the
expectation of a directory instead of a file unless the source is a
directory as below.  so it seeems it's looking to write a file when it
should be just following the path...

[root /root]# rm -rf .ssh/
[root /root]# scp -r www.zeffie.com:/root/.ssh/ .ssh/
The authenticity of host 'www.zeffie.com (207....)' can't be established.
RSA key fingerprint is 19:blabla
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'www.zeffie.com,207....' (RSA) to the list of
known hosts.
www.zeffie.com's password:
100% 1061     0.0KB/s   00:00
[root /root]#

Thanks and Happy new Year!

Cobalt RaQ System Administration, Maintenance and Repairs.
http://www.zeffie.com/how_to_contact_zeffie.html 734.454.9117
http://www.zeffie.com/ Home of the Worlds Largest Collection of RaQ rpms
Advanced Cobalt Security, Firewall, Snort, AntiSpam, AntiVirus, etc. GUI's

More information about the openssh-unix-dev mailing list