How can i run script on other server.

Hi guys ,

I want to run a specific command from one server to another.
For example I have a server called A(client) and a server called B(Server).

How would i fire a command on Server(B) while working on Client(A).

One way of doing it is using ssh
"ssh -tq 10.180.8.231 ls -ltr"
but whenever i execute the command it ask for the password. How would i reduce effort of putting password again and again.

use this
ssh-keygen -t rsa
then save this
then scp this public key in another server (.rsa file) in this path /home/emg/.ssh/authorized_keys2
then ssh to another server it will not ask password any more.
then ur command will execute without any paasword

---------- Post updated at 01:23 AM ---------- Previous update was at 01:18 AM ----------

note:-saving path of another server for .rsa file would be home directory

For passwd less login

How to set up ssh so you aren't asked for a password

Please find the result of following command .
I have run following command in Server(A).
ssh-keygen -t rsa
Saved file in /etc/authorizedkey2.
But it has created 2 files one with no extension and one with .pud extension.
Where do i need to copy the file.
please find the output of find / -name .ssh on client(B) machine.

[root@abc .ssh]# find / -name .ssh
/root/.ssh