Contact us

SSH Public Key Authentication

Server A needs to monitor Srver B via cron or script.

Requirements:
ssh server

On server A:

Do as user_a on Server A

user_a$ ssh-keygen -t rsa
user_a$ cat .ssh/id_rsa.pub

Copy the content of id_rsa.pub to a text editor for future use.

Do as user_b on Server B

user_b$ ssh-keygen -t rsa
user_b$ vi /home/user_b/.ssh/authorized_keys

Copy the content of id_rsa.pub form Server A to authorized_keys2 on Server B. Take note that authorized_keys2 might not be created. If this is the case just continue to add the contents to the authorized_keys2 on Server B.

user_b$ chmod 600 /home/user_b/.ssh/authorized_keys

Then try to login to Server B from server A using the command

user_a$ ssh user_b@Server B

Logging in for the first time will ask you to install the certificate. Just answer yes then continue.

That's it. Enjoy!

 

 

 

Bookmark and Share RSS News Feed