ssh file transfers - how to?

Jay O'Brien jayobrien at
Sun Jan 9 18:33:08 PST 2005

I'm using ssh to connect from my local FreeBSD machine to a
distant FreeBSD machine. I want to copy a file structure, i.e., 
a directory and its subdirectories, from the distant machine 
to my local machine. 

I can do this fine using WS_FTP Pro in Windows, using another 
local Windows machine, and then use WS_FTP Pro to copy the files 
to the FreeBSD local machine from the Windows computer. It seems 
like I should be able to perform the same copy process directly, 
from one FreeBSD machine to the other, using ssh. 

I can connect to the distant machine just fine using ssh. 

For purposes of discussion, I'm logged into the distant machine 
as jay at I'm logged in to the directory /www/jay
and my localmachine directory (now empty) is /home/www/jay. I want 
everything in the www/jay directory on distantmachine to be copied 
as the home/www/jay directory on localmachine. 

Guidance on the commands and syntax to use will be much appreciated.

My follow-on question is -- Is there a way to synchronize the local 
machine with the distant machine if changes are made on the distant 
machine, and vice-versa, on a generic basis, i.e. "distantmachine 
is now the master, correct localmachine to agree"?

Jay O'Brien
Rio Linda, California USA

More information about the freebsd-questions mailing list