1830877 Members
1754 Online
110017 Solutions
New Discussion

Remote login help needed

 
Rudi Martin
Advisor

Remote login help needed

Hi there

I have a menu option where I have different databases on different servers. I want to create one menu that can access accross the servers and then if it finds a certain database , run the menu for that db.

This is an example out of the menu script :
3) if [ -f /mnt/mfg/live/a646/mfg9-0a.d1 ]
then
/home/jca/bin/menu03
else
echo "Connecting to 2nd server, please wait . . ."
rlogin a741s002
fi ;;

This works fine , but I want to be able to execute , for example /home/jca/bin/menu03 on the second server as well... How do I do this ?

Thanks
2 REPLIES 2
Mark Grant
Honored Contributor

Re: Remote login help needed

As long as you don't do any cursor positioning in your menu, you can just use "remsh".

"remsh host:/path/to/menu"

You can also use "ssh" if you are not on a trusted system"
Never preceed any demonstration with anything more predictive than "watch this"
Hoefnix
Honored Contributor

Re: Remote login help needed

Hi,

Copy the scripts across the servers that you like to use it on.
Then edit the .rhosts file for the user that the script should execute.(/home/user1/.rhosts)

Put the servers and remote user in the .rhosts on all your servers like:
server1 user1
server2 user1
server3 user1

Then you shoukd be able to execute the scripts using remsh:
remsh server2 /path/menu03

HTH,
Peter