Wednesday, 24 August 2016

SSH without password access in RHEL

Step 1

Login to server that user going to access without password. Then create ssh keygen rsa with below command.

ssh-keygen -t rsa

then it will show some contents just give enter for all like below image.


Step 2

by default the user will not have the .ssh directory for rsa. So we have to create that directorie with below command

ssh test@ipaddress mkdir -p .ssh

Step 3

Now upload the generated rsa key to the client server with following command.

cat .ssh/id_rsa.pub | ssh test@ipaddress 'cat >> .ssh/authorized_keys'

Step 4

Now set the permission to access the file to user with following command.

ssh test@ipaddress "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"

Step 5

try to login it should not ask password.

ssh test@ipaddress

That's All....

No comments:

Post a Comment

Helm installation on rhel 9

 You can do install with 2 commands  first one is curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-hel...