ssh

ssh keys in kde4

pontohonk.de wrote some code to have kdewallet supply your ssh keys when ssh-agent requires them. Great code, my problem was that it’s been a while since I used kde and f.example qmake wasn’t something I’m used to. So here’s how I did it in OpenSuse 12.1 .

download askpass.C and askpass.pro from pontohonk.de
Issue:

# zypper install libqt4-devel
# zypper install libkde4-devel
# qmake
# make
$ cp askpass /path/to/home/.local/bin/

The rest is well explained by pontohonk.de

That anoying warning from ssh-client when you’ve moved a server

I don’t know how long it’s been around, but I just noticed

<strong>joar@jupiter:~$ ssh vir04</strong>
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
55:[...]:e2:ac:b0.
Please contact your system administrator.
Add correct host key in /home/joar/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/joar/.ssh/known_hosts:306
  remove with: ssh-keygen -f "/home/joar/.ssh/known_hosts" -R vir04
RSA host key for vir04 has changed and you have requested strict checking.
Host key verification failed.
<strong>joar@jupiter:~$ ssh-keygen -f "/home/joar/.ssh/known_hosts" -R vir04</strong>
/home/joar/.ssh/known_hosts updated.
Original contents retained as /home/joar/.ssh/known_hosts.old
<strong>joar@jupiter:~$ ssh vir04</strong>
The authenticity of host 'vir04 (91.207.158.93)' can't be established.
RSA key fingerprint is 55[...]ac:b0.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'vir04' (RSA) to the list of known hosts.

NICE feature

Add your ssh-key when logging on to Kde 4.x in OpenSUSE

I wanted my ssh-keys automatically loaded when loging on to my box.
In OpenSUSE you can easily fix this.

Make sure you got these packages installed:

joar@linux-xsuv:~&gt; rpm -qa | grep ssh
pam_ssh-1.96-26.112
openssh-5.1p1-40.15
openssh-askpass-5.1p1-40.15

Now edit /etc/pam.d/xdm and add the lines

>auth     sufficient     pam_ssh.so
session  required       pam_ssh.so

don’t delete anything there, just add those lines mentioned above.

This ensures ssh-agent is started while logging on and pam tries to unlock any of your ssh keys by using your login password as a passphrase.

Obviously this requires your ssh-key passphrase to equal your login password 🙂

I’ve tested this on OpenSUSE 11.1.

Source for this info at opensuse.org