2

I want to analyse chess games with xboard and stockfish. Locally this is no problem. But my PC is slow, so I have rented a faster linux server, and I want let stockfish run on it.

How can I use xboard on my PC, to connect to stockfish running on the linux server?

I have tried on the command line:

1) ssh -p <port> <user>@<host> /usr/games/stockfish

This works. But:

2) xboard -fcp "ssh -p <port> <user>@<host> /usr/games/stockfish" -fUCI

does not work. There is a connection to stockfish on the server, xboard gives the correct version of the engine, but as soon as I enter the first move, it terminates with error of "broken pipe."

3
  • Can you play a game via ssh without xboard? Oct 14 '20 at 19:41
  • I would like to analyze. Since my PC is slow, I want to use a faster server. BTW, how do I play a game on the console with ssh, without a graphical xboard?
    – ILoveCake
    Oct 15 '20 at 8:40
  • This is too specific. You will need to ask on the xboard forum. HGM the man behind it will be more than happy to answer you.
    – SmallChess
    Oct 16 '20 at 4:30
2

You need to connect to your server with ssh -X command to enable X forwarding. The details of how this needs to be configured can be found in this answer on Unix and Linux Stack Exchange.

1
  • running xboard inside a ssh -X would work, but he would be drawing the GUI across the network, which will result in a poot experience and is actually unneeded for a client/server program architecture like xboard/stockfish (in fact, xboard→polyglot→stockfish).
    – Ángel
    Nov 10 '20 at 1:20
2

I have tried to replicate your setup. To this end, I prepared to virtual machines.

First one, let's call it xboard, with xboard and polyglot installed, but -while not strictly required- not stockfish, fairymax or other engines.

Second one, let's call it stockfish, runs a ssh server and does have stockfish installed.

xboard machine is able to connect to stockfish machine via ssh. In this case ssh host suffices but using the full ssh -p <port> <user>@<host> /usr/games/stockfish in the command works as well.

The command you provided

xboard -fcp "ssh -p 22 user@stockfish.host /usr/games/stockfish" -fUCI

works perfectly. xboard is started locally and connects to stockfish via ssh.

I would recommend to set up ssh key authentication. OTherwise, when you start xboard you will need to manually input the password on the terminal where you are running xboard (and if you waited too long, the connection could timeout).

The error you are facing I can reproduce if manually killing polyglot. If ssh failed, polyglot is providing an error.

I don't see why it would be failing (maybe your versions aren't able to properly cope with spaces in the parameters=), but since directly playing with stockfish via ssh works I would try running:

polyglot -noini -ec "ssh -p 22 user@host /usr/games/stockfish" -ed . -uci NalimovCache=4 -pg ShowTbHits=true

which is the command that my xboard runs to connect.

2

First, thanks to "Ángel" for going to such great lengths in trying to help me and come up with a solution.

After reading some other posts/howtos on the internet (can't remember where exactly), I got it working this way:

xboard -fcp "./ssh user@host './start_stockfish'" -fd
"/home/user/Remote

putting ssh, polyglot and Stockfish.ini into the "Remote" directory on the remote server. "start_stockfish.sh" (also on the remote server) simply looks like this:

cd ~/Remote
polyglot ./Stockfish.ini

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.