CirclingMinds

May 6, 2007

Public Key Authentication

Filed under: linux — shovan @ 9:59 pm

Using public key authentication you can save yourself the hassel of remembering and entering password everytime you try to connect to a remote server. This process requires two files: a private key and a public key that identifies the local machine and the remote host.  Lets get started.

Step 1:

Enter the following command on the local machine.

ssh-keygen -t dsa

It will ask you if you want to enter a pass phare. Ignore it.

That command creates two files

i) id_dsa : This is the private key
ii) id_dsa.pub : public key which you will copy to the remote host where u want to login using the public key authentication method
Step 2:

Copy the id_dsa.pub key to the remote host you want to access.

Step 3:

Log in to the remote host and add the id_dsa.pub file to the authorized_keys file which resides in your ~/.ssh/ directory. If the file and the directory does not exist then you have to create it.

Syntax for adding the public key (id_dsa.pub) to the authorized_keys file:

cat id_rsa.pub > authorized_keys

Now try logging into the remote host. You will notice that you no longer require password to get in. This is because your machine’s public key  is listed in the authorized_keys file that matches to your corresponding id_dsa private key that is located in your ~/.ssh folder.

May 5, 2007

How to setup synergy ( Mac OSX / Ubuntu)

Filed under: linux, mac-os-x — shovan @ 10:01 pm

With the help of Synergy one can manange multiple computers/screens by using just one keyboard and mouse. So i found out after several painful months of using two sets of keyboard and mouse to switch between my Macbook and Ubuntu Desktop. I shall talk about the steps I took to get synergy to work on my Macbook and Ubuntu desktop. I chose to use my Macbook as the server and Ubuntu as the client.

Hostname of my Macbook(Server): isis
Hostname of my Ubuntu Desktop(Client) : venus
Please replace the hostnames in the following example with your correct names.

Step 1.
Download and install the source code from http://synergy2.sourceforge.net/
unzip the file install it on both computers.

./configure
make
sudo make install

Step 2 ( Configure Mac OS X server)
create a file called synergy.conf with the following content

section:  screens
# name the screens
isis:
venus:
end
 
section:  links
# telling synergy direction of the screens
# my macbook is on the left and Ubuntu is on the right
isis:
right = venus
venus:
left = isis
end

to start the synergy server

synergys -f --config syngery.conf

Step 3: ( starting Ubuntu Client)
Make sure you have installed synergy.Then run the following command.

synergyc -f isis
(syngergyc -f hostname-of-synergy-server)

You can also use the ip address of the synergy server.

For more information visit: http://synergy2.sourceforge.net/faq.html

Powered by WordPress