Transferring directories over a network

Roger Merritt mcrogerm at stjohn.ac.th
Tue Dec 21 21:25:02 PST 2004


I hope this isn't too common a question. I couldn't devise a good set of 
keywords to use Google.

I just received a new machine to replace my ancient server/gateway. I 
decided the best way to go was to install FreeBSD 5.3, and transfer user 
directories and config files using ssh over the intranet. Of course, I 
overlooked the fact that you can't login to root. From the old machine, 
Kepler, I used the command line:

'tar cf - /usr/home/onedirectory /usr/home/anotherdirectory | ssh 
myname at russell tar xf -'

Of course the user 'myname' doesn't have write permission in /usr/home. I 
usually use 'ssh' to login and then 'su -', but I don't see how to do that 
in this situation. On my old 4.3 machine a workaround was to login as 
'toor', but 5.3 doesn't seem to allow that (Good Idea (tm)).

I'm lucky enough I have room enough on the old hard drive that I can tar 
the directories there, use 'scp' to transfer them to the account on the new 
machine, and then go untar them there, but if anyone can suggest a more 
elegant (that is, easier) solution I'd appreciate it because I'm going to 
have to go through the whole exercise again when I move the old machine to 
replace an even older and more decrepit box.

-- 
Roger


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.6.3 - Release Date: 12/21/04




More information about the freebsd-questions mailing list