[kde-linux] Starting ssh at log-in

Boyan Tabakov blade.alslayer at gmail.com
Mon Nov 20 20:38:22 UTC 2006

On 20.11.2006 21:13, Andrew Walbran wrote:
> On Tuesday 21 November 2006 7:43 am, Anne Wilson wrote:
> > Hi, Boyan.  Yes, this is a ssh password to enable my work directory to be
> > rsync-ed onto another box.keychain caches it, so that when cron calls for
> > it I don't have to be present to give it - the rsync can happen
> > automatically.
> >
> > Perhaps all that is needed is for me to save a session with a terminal
> > open? I presume that the fact that it currently has the password would
> > not affect the new session, so that I would be asked immediately the
> > session recovery was complete.
> >
> > Or is there a better way of doing it?  Perhaps something I could put
> > into /etc/rc.d/rc.local?
> One possibility would be to create an ssh keypair with ssh-keygen, and then
> add the public key to ~/.ssh/authorized_keys on the machine you are trying
> to connect to. If you choose to give the private key a password, you can
> then use ssh-add to cache it.

If the machine from which you initiate your backup (e.g. your private machine) 
is secure enough, yes, I would definitely recommend that you use a public key 
authentication method to log to the remote machine. This will make the hole 
process automatic and you won't be asked to enter any password.

To enable public key authentication, you should simple copy your ssh client's 
public key to the ~/.ssh/authorized_keys file on your remote machine. Your 
public key can be found in ~/.ssh/id_dsa.pub or ~/.ssh/id_rsa.pub files 
(depending on the algorithm). If no keys are already generated, do so with 
the ssh-keygen command (simply 'ssh-keygen -t [rsa|dsa]). Remember not to 
enter a passphrase, because if one is present you will be prompted to enter 
it to unlock the key and not doing this was the very reason we began with.

Now you should be able to log in to your remote machine with
$ ssh user at remote.machine
directly without being required to enter a password.
If you are still prompted for a password, then probably the remote sshd server 
is not configured to use PAM. (See /etc/ssh/sshd.conf).

After all is set up, you can initialize your backup process the way you want 
it to. Either create a script that is invoked at boot time 
(/etc/rc.d/rc/local or equivalent), or one that is invoked when KDE starts 

Hope this would help... good luck!

Blade hails you...

Old love lies deep you said
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-linux/attachments/20061120/72c1ebd1/attachment.sig>

More information about the kde-linux mailing list