SSH με χρήση κλειδιών – Passwordless SSH

SSH με χρήση κλειδιών

Για να συνδεόμαστε σε ενα σύστημα με SSH χώρις να χρειάζετε να πληκτρολογούμε καθε φορά κωδικό(remote backup πχ), κανουμε τα παρακάτω :

  • Το  σύστημα απο το οποίο κάνουμε/ξεκινάμε την συνδεση θα αναφέρεται απο εδω κ στο εξης ως client.
  • Ομοίως το συστημα στο οποίο συνδεόμαστε θα αναφέρεται ως server.
  • Οι παρακάτω πληροφορίες λειτουργούν μόνο σε  OpenSSH.
  • Στο παράδειγμα χρησιμοποιούμε DSA keys. Αν θέλουμε RSA keys αντικαθιστούμε το  ‘rsa’ με ‘dsa’.
  • Για να πετύχει  η διαδικασία πρέπει να δωθούν οι εντολές σε Bourne-like κέλυφος (sh, ksh or bash)

Βήματα:

  1. Στον  client εκτελούμε τις παρακάτω εντολές:
  1. $ mkdir -p $HOME/.ssh
  2. $ chmod 0700 $HOME/.ssh
  3. $ ssh-keygen -t dsa -f $HOME/.ssh/id_dsa -P ”

Αυτο θα μας δημιουργήσει 2 αρχεία,

1)      $HOME/.ssh/id_dsa (private key) και

2)      $HOME/.ssh/id_dsa.pub (public key).

  1. Αντιγράφουμε το  $HOME/.ssh/id_dsa.pub στον  server.
  2. Εκτελούμε τα παρακάτω στον server :
  1. $ cat id_dsa.pub >> $HOME/.ssh/authorized_keys2
  2. $ chmod 0600 $HOME/.ssh/authorized_keys2

Αναλόγως την έκδοση του που έχουμε OpenSSH ίσως να χρειαστούν και οι παρακάτω εντολές:

$ cat id_dsa.pub >> $HOME/.ssh/authorized_keys

$ chmod 0600 $HOME/.ssh/authorized_keys

  1. Ελέγχουμε την ορθή λειτουργία στον  client δοκιμάζοντας την σύνδεση με τον  server ώς εξής :
  1. $ ssh -i $HOME/.ssh/id_dsa server
  2. Host server
  3. IdentityFile ~/.ssh/id_dsa
  1. (Προεραιτικά) Προσθέτουμε τις παρακάτω γραμμές στο αρχείο $HOME/.ssh/config στον client:

Αυτο μας επιτρέπει να καλουμε το ssh χωρις την χρήση του διακόπτη –i και την διαδρομη του κλειδιού.πχ : ssh root@server

That’s all folks 😀

Cooking recipes website (2004)

While brainstorming about life and what everyone wanted from it, a summer some 5-6 years ago (2004 ish :P) by the seaside with a host of mates and lasses, it came to my attention that everyone would praise as a list topping priority: Food 🙂

In Greece, at that time we had about 2-3 websites with recipes and none of them, after some quick skimming, had variety nor the features I would like to see in a website about cooking recipes.

So I went ahead and registered the domain: sidages.gr ( greek-lish for recipes) and everyone was happy that we soon should have our very own recipe website.

Thus it came to life. Well sort of ..:D.

At first, there was light, that is a bunch of custom made PHP scripts.

Then came Joomla and another custom made module that is fully functional and quite nice as well!

But my personal Holy Grail has always been the endless questing for new knowledge. So the latest iteration of sidages.gr is actually based on the Drupal CMS. My newly acquainted colleagues (2006 :P) praised so much Drupal as a content management system, that I had to give it a try!

Needless to say, I was hooked on the architecture immediately (Drupal 5.x at the time). All in all, it is a very interesting experience and of course, you can never know enough on any subject.

It is still in the building process, need ideas, a spanking template and of course recipes for it, loads of them. The good thing is I am an eager cooker myself and cooking at a minimum couple of times per week both proper food and deserts.

I hope it grows quickly and thanks to everyone for their suggestions and the heads up. Keep that coming please 😀

Check it out here: https://www.sidages.gr

 

OOP Programming – Best book ever for free..

Not much to say about this one.

Phenomenal teacher – writer Bruce Eckel has wrote one of the best Java books i have encountered. Intuitive and skilled he covers almost everything, without hindering even a newcomer to OOP languages, in the great series of Thinking in Java.

Quoting the MAN himself : “When I think of a chapter in the book, I think in terms of what makes a good lesson during a seminar. My goal is to get bite-sized pieces that can be taught in a reasonable amount of time, followed by exercises that are feasible to accomplish in a classroom situation.

In my opinion his approach is one of the best.Go ahead and see for your selves. 😀

Read on here http://www.mindview.net/Books/TIJ/

Free image hosting

I was on the usual administrative spree that gets to every “sane” IT fella every once in a while..

In the process i was checking the analytics and traffic for one of the projects i undertook ,for the sake of learning some more advanced concepts of php and file handling in an unsafe e.g Internet, environment.

I was very pleased to see lots of people using ,in a great range of websites from blogs and forums to myspace and facebook, an quite old project i made back in 2003, namely http://imagehost4free.telmako.com

Getting recommended as an image hosting service, from one the most notorious writers in http://e-pcmag.gr/forum/6036 (one of the best Greek personal computer related forums), is just to great an honour.

It seems that free image hosting is never getting old and what’s better than a hassle free, simple upload your photo and get ready html – BB code to use in facebook, myspace, forums?

To be  honest i had almost forgot about that project but its getting a refurbish quite soon with some nice upgrades to size limitations etc..

Thanks for the vote peeps.

See you soon.