Re: Passwordless SSH setup
very nicely explained! (interested in fleshing this out some to
make a newbiedoc out of it? :)
On Wed, Jun 02, 2004 at 07:37:42AM -0700, Bill Moseley wrote:
> And in case anyone finds this in the archive, on SSH Secure
> Shell you need to convert the keys. So on Debian, create a
> keypair called "rsync" and "rsync.pub"
>
> $ ssh-keygen -t dsa -f rsync
>
> Then convert and copy to the other machine:
>
> $ ssh-keygen -e -f rsync.pub | ssh <remotehost> 'cat - > .ssh2/rsync.pub'
>
> and in your .ssh/config file add something like this to use
> this single-use key (needed because if you already have a key
> for the remote host managed by ssh-agent then it will be used
> instead):
>
> Host rsync
> User foo
> HostName remote.host.name
> IdentitiesOnly yes
> IdentityFile ~/.ssh/rsync
>
> which says to use only the identity (key) file(s) listed in
> the config file. man ssh_config(5)
>
> Then, on the remote host in .ssh/authorization set the
> "rsync.pub" key for running a single command:
>
> key rsync.pub
> Options command="rsync --server --daemon --config=rsync.conf ."
>
> And setup rsync.conf as explained in the rsync manual
>
> [foo_dir]
> comment = Provides read-only access to foo
> path = /path/to/foo
> read only = yes
> exclude = logs
> # can't chroot since running as a regular user
> use chroot = no
>
> Then back on the Debian machine:
>
> $ rsync -av --rsh="ssh rsync" ::foo_dir local_dir
>
> or use whatever options you need when using rsync.
> --
> Bill Moseley
> moseley@hank.org
--
I use Debian/GNU Linux version 3.0;
Linux boss 2.4.18-bf2.4 #1 Son Apr 14 09:53:28 CEST 2002 i586 unknown
DEBIAN NEWBIE TIP #88 from Jesse Goerz <jgoerz@linuxfreemail.com>
:
Ever wondered WHAT DOCUMENTATION IS ON YOUR SYSTEM? And if
there was an easy way to browse it?
apt-get install dhelp
dhelp
or for those running the testing distribution, try
doc-central as well.
Also see http://newbieDoc.sourceForge.net/ ...
Reply to: