Tech Support

Accessing SSH without Password.

7.1 Generating ssh key to your log in.

First log in as a user1 and generate a pair of authentication Keys. While you go through this process you will be asked to enter the passphrase. Do not enter any passphrase. Follow the steps shown as in bellow images.

     [cad@ganga ~]$
     [cad@ganga ~]$ cd .ssh/
     [cad@ganga .ssh]$ ll
     total 32
     -rw------- 1 cad cad  406 Dec 24 10:59 authorized_keys
     -rw------- 1 cad cad 1675 Dec 24 10:54 id_rsa
     -rw-r--r-- 1 cad cad  406 Dec 24 10:54
     -rw-r--r-- 1 cad cad  790 Dec 24 10:55 known_hosts

Above you can see some files list already. Its not necessary to have above files, You can clear all the file you have in .ssh folder in your home folder

    [cad@ganga .ssh]$ now run "ssh-keygen" command and follow the steps. 
                      Here do not enter an passphrase just use enter key.
                      Leave it empty.
    [cad@ganga .ssh]$ ssh-
    ssh-add      ssh-agent    ssh-copy-id  ssh-keygen   ssh-keyscan
    [cad@ganga .ssh]$ ssh-keygen
    Generating public/private rsa key pair.
    Enter file in which to save the key (/home/cad/.ssh/id_rsa):
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in /home/cad/.ssh/id_rsa.
    Your public key has been saved in /home/cad/.ssh/
    The key fingerprint is:
    [cad@ganga .ssh]$ Once the process over it genrate two files as shown above
                      with bold.

7.2 Copying to authorized_keys file

Now list for generated file and copy file to authorized_keys.

        [cad@ganga .ssh]$ ll
        total 16
        -rw------- 1 cad cad 1675 Dec 24 11:16 id_rsa
        -rw-r--r-- 1 cad cad  405 Dec 24 11:16
        [cad@ganga .ssh]$
        [cad@ganga .ssh]$ now copy id_
        [cad@ganga .ssh]$ l
        [cad@ganga .ssh]$ ll
        total 16
        -rw------- 1 cad cad 1675 Dec 24 11:16 id_rsa
        -rw-r--r-- 1 cad cad  405 Dec 24 11:16
        [cad@ganga .ssh]$ now copy to authorized_keys file
        -bash: now: command not found
        [cad@ganga .ssh]$ cp -rvf authorized_keys
        `' -> `authorized_keys'

7.3 Log in to different Workstation / Pc in Same network without Password.

Once the authorized_key file is generated, you can log in to different linux in same network with passowrd. In case you are using SVN over SSH than you need not enter the password. It will continue to process.

    [cad@ganga .ssh]$ ll
    total 24
    -rw-r--r-- 1 cad cad  405 Dec 24 11:18 authorized_keys
    -rw------- 1 cad cad 1675 Dec 24 11:16 id_rsa
    -rw-r--r-- 1 cad cad  405 Dec 24 11:16
    [cad@ganga .ssh]$ you can see the authorized_keys file is copied.
                      Now you can try log in to different pc and it 
                      will not ask for password
    [cad@ganga .ssh]$ ssh -X cad@
    The authenticity of host ' (' can't be established.
    RSA key fingerprint is 40:6a:7a:92:e8:45:a1:6a:0e:23:ad:95:22:80:00:7c.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '' (RSA) to the list of known hosts.
    Last login: Wed Apr  4 12:48:41 2012 from
    [cad@satpura ~]$

Here you are logged in without passowrd.