Showing posts with label SSH. Show all posts
Showing posts with label SSH. Show all posts

Thursday, 19 March 2015

how to configure passwordless ssh in linux

SSH PASSWORDLESS LOGIN 

SSH (Secure Shell) is a network protocol, It also allows a user to establish a secure channel over an insecure network.
The Main difference between SSH, TELNET, RSH is security, for Telnet, rsh and rexec protocols send information, notably passwords, in plaintext.
{Note:-  ~/.ssh  is a main directory for ssh which should be present under all users home directory [~ represents the home directory of a user]. Permission for this ssh directory should be 700.}

sshd

This is the daemon service that implements the ssh server. By default it must be listening on port 22 TCP/IP [Note:- Daemon is nothing but the process that is running on the background]


Step1:- log in  as any user  on machine1 (server) and generate a pair of authentication keys. Please do not enter a passphrase

[root@server ~]# ssh-keygen

Step1:- copy the generated key from machine1(server) to machine2(client) by using this command

[root@server ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.58.129
{Note:- 192.168.58.129 is machine 2(client) IP}
Now public key file is successfully copied to machine B so you can able to login machine 2 without entering the password.

[root@server ~]# ssh 192.168.58.129
Last login: Thu Mar 19 19:20:39 2015 from 192.168.58.128
[root@client ~]#