0

How can I enable password less authentication with SSH.

This is what I have when I was looking for /.ssh folder.

bash-3.00$ cd ~/.ssh
bash-3.00$ pwd
/home/uname/.ssh
bash-3.00$ ls -lt
total 2
-rw-r--r--   1 uname   gid-uname     489 Jul 26 18:55 known_hosts

And I don't know what next I have to do here? I need to change the permission of known_hosts folder? Or something else?

AKIWEB
  • 19,008
  • 67
  • 180
  • 294

4 Answers4

3

To enable passwordless ssh between remote and local machine, you have to perform these steps on your local machine :-

1st Step> root@localmachine:~> ssh-keygen -t rsa

Note - Considering that .ssh dir is already present in remote machine if not, then do this (ssh root@remotemachine mkdir -p .ssh)

2nd Step> cat .ssh/id_rsa.pub | ssh root@remotemachine 'cat >> .ssh/authorized_keys'

3rd Step> root@localmachine:~> ssh root@remotemachine

COD3R
  • 129
  • 9
1

Add your public key to a file called authorized_keys.

Make sure that no group and other permissions are not set.

KarlP
  • 5,149
  • 2
  • 28
  • 41
0

http://stromberg.dnsalias.org/~strombrg/ssh-keys.html

HTH

user1277476
  • 2,871
  • 12
  • 10
0
  • Generate your keys using ssh-keygen
  • Copy over your SSH identity to the host (to which you need passwordless login) using ssh-copy-id.

man ssh-keygen and man ssh-copy-id on your system for help.

rmk
  • 4,395
  • 3
  • 27
  • 32