Showing posts with label ssh. Show all posts
Showing posts with label ssh. Show all posts

Friday, January 6, 2012

Spieglein - Sharing public keys via display and webcam (or so)

Sharing (cryptographic) keys is still mandatory in or cryptography landscape.
A nice exmaple is our ~/.ssh/authorized_keys file which contains a list of public ssh keys which are allowed to login.
One way to exchange those keys is using ssh-copy-id.

Another one is using a webcam and some display - like the ones found in laptops or mobile phones (but even white paper works ;)
The principle is quite simple, just QR encode your public key and point the webcam at the screen to get a picture of the QR encoded public key and decode it.
Voila you've got your own copy of the public key. And it's quite hard to intersect photons on their way from the display to the webcam, so your copy can be trusted.

It is as easy as encoding the image
$ bash create_pubkey_qr.sh 

This results in a image like this:

Now, on the receiving computer, run
$ ./look_for_qr.vala
And point the webcam at the surface displaying the QR code in question ...

You might need to install some dependencies using
$ sudo yum install -y vala glib2-devel qrencode \
gstreamer-plugins-bad-free-extras


Just look here for a working example.

Tuesday, November 29, 2011

Using lokkit to handle your firewall.

Some common thing is to turn of the firewall if a freshly installed machine isn't reachable from the outside, as fidling with iptables is not everyones passion.

lokkit is another way to open some ports to the public.

Just use
$ sudo lokkit --list-services

to see what services/ports can be managed/opened using lokkit. For me it's quite common to open ports for ssh, ipsec and mdns afer a fresh installation

$ sudo lokkit -s ssh
$ sudo lokkit -s mdns
$ sudo lokkit -s ipsec

Let's see if there will be something new in the near future to handle - somtimes quite complex (see virtualization) - iptable setups.