martedì 19 ottobre 2010

Secure ssh: from password to public key authentication

Disabling ssh access with password authentication is an easy way to make more secure your system.
The alternative to password is authentication with public/private key pair. This prevents some security holes like sending the password over the net or brute force attacks.
First of all generate a pair of key in the client:
ssh-keygen -t rsa
you will be prompted for files where store the keys (default is ~/.ssh/id_rsa for private key and ~/.ssh/id_rsa.pub for public key) and for a pass-phrase to protect the private key (you will be prompted for every time you try to log to a remote host with public key authentication).
Next, upload the public key in the remote host, from the client host launch
ssh-copy-id remote-user@remote_host
This command installs the public key in the ~/.ssh/authorized_keys file of the remote-user on the remote_host. Now the client host can log in on remote_host as remote-user without typing the password, the authentication is done automatically under the hood.
Verify the correct execution of the command logging in to the remote host:
ssh remote-user@remote_host
no password should be asked.
The public key of the client can be upload to every user/host where you want to be authenticated without password.
The last step is to disable password authentication on remote_host. This is done editing /etc/ssh/sshd_config (as root user); the following lines must be present
PasswordAuthentication no
RSAAuthentication yes
PubkeyAuthentication yes
Then reload the ssh configuration
/etc/init.d/ssh reload
Verify that password authentication is disabled trying to log in from another client which has not setup public key authentication. The user should be refused, on my machine the message is:
Permission denied (publickey)

venerdì 15 ottobre 2010

giovedì 7 ottobre 2010

Caratteri speciali HTML

Tra l' & e il codice non ci va lo spazio.

Spazio = & nbsp;
" = & quot;
& = & amp;
< = & lt;
> = & gt;
© = & copy;
® = & reg;
´ = & acute;
« = & laquo;
» = & raquo;
¡ = & iexcl;
¿ = & iquest;
À = & Agrave;
à = & agrave;
Á = & Aacute;
á = & aacute;
 = & Acirc;
â = & acirc;
à = & Atilde;
ã = & atilde;
Ä = & Auml;
ä = & auml;
Å = & Aring;
å = & aring;
Æ = & AElig;
æ = & aelig;
Ç = & Ccedil;
ç = & ccedil;
Ð = & ETH;
ð = & eth;
È = & Egrave;
è = & egrave;
É = & Eacute;
é = & eacute;
Ê = & Ecirc;
ê = & ecirc;
Ë = & Euml;
ë = & euml;
Ì = & Igrave;
ì = & igrave;
Í = & Iacute;
í = & iacute;
Î = & Icirc;
î = & icirc;
Ï = & Iuml;
ï = & iuml;
Ñ = & Ntilde;
ñ = & ntilde;
Ò = & Ograve;
ò = & ograve;
Ó = & Oacute;
ó = & oacute;
Ô = & Ocirc;
ô = & ocirc;
Õ = & Otilde;
õ = & otilde;
Ö = & Ouml;
ö = & ouml;
Ø = & Oslash;
ø = & oslash;
Ù = & Ugrave;
ù = & ugrave;
Ú = & Uacute;
ú = & uacute;
Û = & Ucirc;
û = & ucirc;
Ü = & Uuml;
ü = & uuml;
Ý = & Yacute;
ý = & yacute;
ÿ = & yuml;
Þ = & THORN;
þ = & thorn;
ß = & szlig;
§ = & sect;
¶ = & para;
µ = & micro;
¦ = & brvbar;
± = & plusmn;
· = & middot;
¨ = & uml;
¸ = & cedil;
ª = & ordf;
º = & ordm;
¬ = & not;
_ = & shy;
¯ = & macr;
° = & deg;
¹ = & sup1;
² = & sup2;
³ = & sup3;
¼ = & frac14;
½ = & frac12;
¾ = & frac34;
× = & times;
÷ = & divide;
¢ = & cent;
£ = & pound;
¤ = & curren;
¥ = & yen;

martedì 5 ottobre 2010

How to show editable location bar in nautilus

From Ubuntu 10.04 the location bar is displayed by default in "breadcrumbs mode". Clicking on breadcrumbs buttons does not more switch the location bar in the edit mode.
This can be done using the shortcut CTRL+L (or from the menù Go > Location).
With ESC is possible to go back to the breadcrumbs mode.

Rar files support in Ubuntu's Archive Manager

By default Ubuntu's Archive Manager doesn't support opening files in rar format. The unrar package provides this functionality, it can be installed with the command

sudo apt-get install unrar