Answers.Body: <p>First, thanks to &quot;Ángel&quot; for going to such great lengths in trying to help me and come up with a solution.</p>
  <p>After reading some other posts/howtos on the internet (can't remember where exactly), I got it working this way:</p>
  <pre><code>xboard -fcp &quot;./ssh user@host './start_stockfish'&quot; -fd
  &quot;/home/user/Remote
  </code></pre>
  <p>putting ssh, polyglot and Stockfish.ini into the &quot;Remote&quot; directory on the remote server. &quot;start_stockfish.sh&quot; (also on the remote server) simply looks like this:</p>
  <pre><code>cd ~/Remote
  polyglot ./Stockfish.ini
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-15T09:08:56.273Z
Answers.LastActivityDate: 2020-11-15T09:08:56.273Z
Answers.UserDisplayName: ILoveCake
Answers.Body: <p>I have tried to replicate your setup. To this end, I prepared to virtual machines.</p>
  <p>First one, let's call it xboard, with <code>xboard</code> and <code>polyglot</code> installed, but -while not strictly required- not <code>stockfish</code>, <code>fairymax</code> or other engines.</p>
  <p>Second one, let's call it stockfish, runs a ssh server and does have stockfish installed.</p>
  <p>xboard machine is able to connect to stockfish machine via ssh. In this case <code>ssh host</code> suffices but using the full <code>ssh -p &lt;port&gt; &lt;user&gt;@&lt;host&gt; /usr/games/stockfish</code> in the command works as well.</p>
  <p>The command you provided</p>
  <pre><code>xboard -fcp &quot;ssh -p 22 user@stockfish.host /usr/games/stockfish&quot; -fUCI
  </code></pre>
  <p>works perfectly. xboard is started locally and connects to stockfish via ssh.</p>
  <p>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).</p>
  <p>The error you are facing I can reproduce if manually killing polyglot. If ssh failed, polyglot is providing an error.</p>
  <p>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:</p>
  <pre><code>polyglot -noini -ec &quot;ssh -p 22 user@host /usr/games/stockfish&quot; -ed . -uci NalimovCache=4 -pg ShowTbHits=true
  </code></pre>
  <p>which is the command that my xboard runs to connect.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-10T01:53:11.457Z
Answers.LastActivityDate: 2020-11-10T01:53:11.457Z
Answers.UserDisplayName: Ángel
Answers.Body: <p>You need to connect to your server with <code>ssh -X</code> command to enable X forwarding. The details of how this needs to be configured can be found in <a href="https://unix.stackexchange.com/questions/12755/how-to-forward-x-over-ssh-to-run-graphics-applications-remotely">this answer on
  Unix and Linux Stack Exchange</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-10T01:20:25.020Z
Answers.Text: 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).
Answers.UserDisplayName: Ángel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-09T19:01:26.560Z
Answers.LastActivityDate: 2020-11-09T19:25:40.987Z
Answers.LastEditDate: 2020-11-09T19:25:40.987Z
Answers.UserDisplayName: YB1
Body: <p>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.</p>
  <p>How can I use xboard on my PC, to connect to stockfish running on the linux server?</p>
  <p>I have tried on the command line:</p>
  <pre><code>1) ssh -p &lt;port&gt; &lt;user&gt;@&lt;host&gt; /usr/games/stockfish
  </code></pre>
  <p>This works. But:</p>
  <pre><code>2) xboard -fcp &quot;ssh -p &lt;port&gt; &lt;user&gt;@&lt;host&gt; /usr/games/stockfish&quot; -fUCI
  </code></pre>
  <p>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 &quot;broken pipe.&quot;</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-14T19:41:44.487Z
Comments.Text: Can you play a game via ssh without xboard?
Comments.UserDisplayName: Christian H. Kuhn
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-15T08:40:03.460Z
Comments.Text: 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?
Comments.UserDisplayName: ILoveCake
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-16T04:30:33.093Z
Comments.Text: 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.
Comments.UserDisplayName: SmallChess
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-04-28T18:00:35.793Z
Comments.Text: You say "Locally this is no problem. " but for me, it is. Please see https://chess.stackexchange.com/q/45352/38299 and help. Maybe the programs have misimproved recently.
Comments.UserDisplayName: Gyro Gearloose
Tags: <engines><analysis><software><stockfish>
Title: Xboard and a remote engine
ThreadText: # Xboard and a remote engine
  
  (Asked by: username_0 on 2020-10-14)
  
  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."
  
  **Tags:** engines, analysis, software, stockfish
  
  > **Comments:**
  > **username_1**: Can you play a game via ssh without xboard?  
  > **username_0**: 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?  
  > **username_2**: 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.  
  > **username_3**: You say "Locally this is no problem. " but for me, it is. Please see https://chess.stackexchange.com/q/45352/38299 and help. Maybe the programs have misimproved recently.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_0 on 2020-11-15. Score: 2 | Accepted answer
  
  First, thanks to "username_4" 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
  
  ```
  
  
  ---
  
  ### Answer by username_4 on 2020-11-10. Score: 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.
  
  
  ---
  
  ### Answer by username_5 on 2020-11-09. Score: 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](https://unix.stackexchange.com/questions/12755/how-to-forward-x-over-ssh-to-run-graphics-applications-remotely).
  
  > **Comments:**
  > **username_4**: 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).  
  
  ---
  
  