sabato 24 gennaio 2009

Ubuntu, how to regenerate OpenSSH host keys

First, change directory to /etc/ssh

cd /etc/ssh

now, remove the old rsa and dsa keys files

sudo rm ssh_host_*

Generate new keys

sudo dpkg-reconfigure openssh-server

If you wanto to be 100% sure that the server you are connecting to is the one it claims to be, take note of the RSA and DSA fingerprint

sudo ssh-keygen -l -f ssh_host_rsa_key
sudo ssh-keygen -l -f ssh_host_dsa_key

to check against the fingerprint displayed next time you are going to connect.

Last, update your known_hosts file

~/.ssh/known_hosts

removing the line that contains the old reference, otherwise you'll get the following message

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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)!

venerdì 16 gennaio 2009

Stop VMware Fusion to automatically map shared folders

If your Windows XP virtual machine under VMware Fusion (v2) insist to map the shared folder as unit Z: and creates a shortcut on the desktop you must edit the relative .vmx file.

Usually this file is hidden under the following directory

/Users/YourUserName/Documents/Virtual Machines/YourWinVMName.vmwarevm

Find and change to FALSE the following keys

hgfs.mapRootShare = "TRUE"
hgfs.linkRootShare = "TRUE"

The first one is in charge to map the share without your intervention, so that when you open up My Computer you magically find a Z: unit.
The last one tells Fusion to create a shortcut on the desktop.