I have server 1 running aix configured at 192.168.0.1 and and another Linux server configured at 192.168.0.2. I am currently using expect to login as root@192.168.0.2.
The problem is that the process running expect aborts because it is a background process and once it hits the input for username it thinks it is at a stop. I wanted to install keys so that it will not prompt for the password and I can do away with expect.
I read how to install the keys, but am confused. I am logged into 192.168.0.1 as user1 not root and will be running the ssh command using using user1 and not root.
Do I create the keys as root or user1 on 192.168.0.1? I want to be logged in as user1 on 192.168.0.1 and do ssh root@129.168.0.2 without password prompting.