Setting up Winboard for autoplayer games over a network

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

Setting up Winboard for autoplayer games over a network

Postby Anonymous » 12 Jun 2005, 11:33

It was not really trivial to setup starting an engine over the network with free tools. So, I thought this info might be useful for some of you. The setup consists of three parts.

1. Setup an ssh (secure shell) server on one computer (the computer, you want to run the remote engine on).
2. Setup an ssh client on the computer, you run Winboard GUI on (and a local engine)
3. Setup Winboard, to start the remote engine via the shh client.

I assume, you have setup a TCP/IP based network already. Here I have a DSL WLAN router. By default IP adresses will assigned dynamically. If this is the case at your place, too, you should assign static IP adresses. To do this, I had to open the control Panel, network connections, right click on the LAN icon, clicking on TCP-IP (which highlights this) and clicking on the properities button. Now I had "automatically get IP adress" (I see all these texts in German and tried to guess the translation to English - the actual text will probably be a bit different). I clicked on "fixed IP Adress". Now I filled in

IP-Adress: 196.168.2.55
Subnet mask: 255.255.255.0
Gateway: 196.168.2.1 (this is the WLAN router)
Preferred DNS: 196.168.2.1
Secondary DNS: leave empty

You might not need to do these steps, or change them appropriately.

1. This was the most difficult part. I could not find another free ssh server than openssh that is included with Cygwin. It is not trivial to setup. I assume, you have no cygwin installed on your computer yet. You can download a minimal package at
http://sshwindows.sourceforge.net/ Download the binary install program there. The instructions I give should work on XP home, and might work with other versions.

Start the installer program you downloaded. By default, it will install the files in c:\program files\openssh (On my German Windows it is c:\programme\openssh.

Open a command window ("DOS prompt"). Type

cd \program files\openssh\bin
mkgroup -l >> ..\etc\group
mkpasswd -l -u Dieter >> ..\etc\passwd

Change Dieter to your username. I assume you have set up Windows to need a password. If you have not done so yet, you probably should do it now.

For me, the entry created in ..\etc\passwd did not work. So

notepad ..\etc\passwd

You will find one line with entries between ":" I had to change the last two entries. By default they were

[...]:/home/dieter:/bin/switch

They are your home directory and the command shell, that will be used. For me, /bin/switch did not work. I changed this to

[...]:/cygdrive/c:/bin/sh

/cygdrive/c is just the way the cygwin environment accesses c:\; /bin/sh is a Unix like shell (that comes with the openssh package). You won't need to know any details about this. Make sure, that you don't have automatic line wrapping enabled in notepad. Everything must appear on one long line. Save this changed passwd file.

Now reset the computer. (It might be enough to type "net start openssh" instead.) After rebooting the openssh service should be started by default. It does not have a large memory footpring, and should not degrade performance on the computer in any way.

I have the builtin Windows firewall enabled by default. It will block connections to the openssh service. So go to the control panel -> windows firewall. Click the "exceptions" tab, click on port. Under name, I put sshd (you can chose it to your liking), and under port number 22 (this is the port used by ssh). Click ok.

Setup of the openssh server (which from Winboard point of view will be the client computer) should be complete now, and also the hardest part of the setup.

2. Install the ssh client on the computer Winboard is running. I suggest plink.exe
from http://www.chiark.greenend.org.uk/~sgta ... nload.html

You just have to download the file to some suitable location, preferrably in your path (you could use c:\windows).

You have to start plink once interactively. Start a DOS shell, type

plink -ssh Dieter@192.168.2.55

Of course change IP adress and user name according to your setup. You will be asked the question

Store key in cache (y/n)

type y Enter
type exit

You also have to type in your Password (I actually forgot, if this was befor or after the Store key question, but it should be obvious).

The Store key in cache question will not be asked anymore later. The only reason, you had to start plink once interactively was to answer this question to finish the setup. When you want to connect to more than one computer, you have of course to do this interactive login to every single computer (and also the openssh setup above).

This finishes the ssh client installation.

3. Now you could already start Winboard with a suitable commandline to start the engine on the remote computer. The command will be:

c:\windows\plink Dieter@192.168.2.55 -ssh -pw <MyPassWord> cd /cygdrive/c/chess/yace;yace

So, instead of just using C:\chess\yace as engine, plink is used with a suitable command line. You might make a copy of plink.exe for every chess engine you want to start on a remote computer and name it something like yace_over_ssh_on_compabc.exe.

The cd part is to change to the engine home directory, so that it will find its ini files.

In winboard.ini add a line

"c:\windows\plink.exe Dieter@192.168.2.55 -ssh -pw <password> cd /cygdrive/c/src/yace;/cygdrive/c/src/yace/yace"

under /firstChessProgramNames and /secondChessProgramNames

And you are finished. It should be obvious, how to change the line for your concrete situation. Problems might arise, when the path to the chess engine has spaces included or other special letter. I did not try it out, it will proably need some horrible quoting. Perhaps using DOS type names like /cygdrive/c/PROGRA~1/... might work, too. I setup my engines in directory without spaces.

A very similar method will also work with other Winboard and UCI GUIs. For example for Shredder classic GUI, I use a file yace_over_ssh.eng with the following contents:

[ENGINE]
Name=Yace via ssh
Author=Dieter Buerssner
Filename=c:\windows\plink.exe
Parameter=Dieter@192.168.2.55 -ssh -pw <Password> cd /cygdrive/c/chess/yace;/cygdrive/c/chess/yace/yace

Remember, that /cygdrive/c/chess/yace is the cygwin way to say c:\chess\yace.

If you are using an UCI engine like this, and you want to use TBs, you should probably make sure, that on every computer you have setup the TB directory at the same place, because typically UCI GUIs send the same Nalimov path to any engine.

Using the engine over the network does not seem to slow down anything noticably.

A very similar procedure should work over the Internet. But I could not test it. It will also work, to run the remote engine on a different OS (for example Linux). But you will need to find out yourself, how to setup the ssh daemon on the Linux computer.

Now testing with ponder on can start :-) No need for a autoplayer and null modem cable anymore.

I guess, there are easier methods, but because I have gone through this, and it seems to work very well, I thought I could share my experience.

Regards,
Dieter
Anonymous
 

Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 35 guests