Command to connect to remote AIX server

Hi All,
Im looking for a command that can remotely connect to another AIX machine and execute scripts present in that server(Possible scenarios are a complete a restart of 3 servers in a cluster through a single script execution present in one of the servers). Im relatively new to AIX and any help would be deeply apprecieted.

Regards,
Vishakh

The most common way to do this nowadays is through "ssh" (secure shell). Classical means to achieve this would be "rexec"/"rcmd" and/or "rlogin", but these protocols and tools are typically disabled today, along with "telnet", because passwords would be transmitted in clear text over the network.

All these have been replaced by "ssh" nowadays. You can even exchange secret keys and this way establish "chains of trust" between systems so that you can execute commands remotely (within these chains of trust) without giving any password. This is handy for automated processes.

I hope this helps.

bakunin

1 Like

Thanks you so much for the response. Can you also post a sample code of the same, so that i can get an insight as well as develop a sample one based on that.

There is no sample - "ssh" is a complete package (open source, btw.), which is provided as installable software. Install it, configure it, done. There are lots of manuals and configuration samples out there, no need to provide one more.

In fact the configuration is pretty simple, there are 2-3 settings you have to edit for a basic configuration.

I hope this helps.

bakunin

Hi Vishakh,

You would normally use something like this;

ssh "username"@"hostname" '/path/to/my_script'

example

ssh monitor@server123 'uname -a'

This per supposes that you have setup the required keys in the known hosts file etc.

Regards

Dave

I am not sure about the cluster your talking for 3 servers. :confused:
But according to my understanding for your query,

I will make one server as master for SSH key gen and share the keys to other servers, so there would be a free login to those servers.

And for executing the script , The script is placed in the NFS directory(Master) and mounted to those three servers.

Then a basic for loop script is executed in master.

Tested: I use to create users in one shot for multiple servers.