Wednesday, 10 August 2016

ssh - Password less login

SSH Localhost


SETP I: 

Nothing needs to be done here if you have already generated ssh keys. To verify just check for the existance of ~/.ssh/id_rsa and the ~/.ssh/id_rsa.pub files. If not the keys can be generated using

$ ssh-keygen -t rsa
Enable Remote Login
“System Preferences” -> “Sharing”. Check “Remote Login”
Authorize SSH Keys
To allow your system to accept login, we have to make it aware of the keys that will be used
$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

SETP II:
you need to set file permissions right , try this ..
 $chmod go-w ~/
 $chmod 700 ~/.ssh
 $chmod 600 ~/.ssh/authorized_keys

Usage - 

$chmod 700 File1
$chmod 070 File2
$chmod 007 File3
$chmod 510 File4




No comments:

Post a Comment