[kde-linux] Starting ssh at log-in

Anne Wilson cannewilson at tiscali.co.uk
Tue Nov 21 10:18:57 UTC 2006

On Monday 20 November 2006 20:38, Boyan Tabakov wrote:
> 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.
No, that's a misunderstanding.  I do want to have to give the passphrase.  I 
just want to be asked for it as early as possible, rather than on me 
remembering to open a konsole.

I do have the keys set up, and everything works.

> 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
> (~/.kde/Autostart).
I've added konsole to rc.local, but then things behave very differently.  
Konsole did not in fact start up, and I had to start it manually, but this 
time it didn't ask me for the passphrase.  Somewhat worried by that, I 
manually ran the script that requires it, and it worked perfectly, so clearly 
the method being used has changed by my change to rc.local.

I then tried putting a startup for konsole into /.kde/env/.  This was 
disastrous.  Konsole tried to start up first, and I got a password request 
over the top of it.  I gave the password, but everything just hung there.  I 
had to kill X, start a gnome session, and get rid of the new startup 
addition.  Clearly that's not the way to do it, either.

> Hope this would help... good luck!

I haven't found the best answer for my needs, but I do appreciate the efforts 
people have made to help.


More information about the kde-linux mailing list