Jump to content

Pi4 SSH issues

iGPR3

Hi there. I'm hosting a website on my Pi4 B 4GB that will use SSH to turn on my server and open a program for me. Unfortunately, SSH has some issues with my BeamMP server (BeamNG multiplayer). When it uses SSH, it goes straight to the correct file path and runs the BeamMP-server.exe file to start it. When running this normally with a mouse, it starts just fine, but with SSH it can't read the ServerConfig.toml file, where an authkey is stored. Without the authkey, it won't start the server up. Anyone know how I can fix this? Any help is appreciated. Thanks.

 

Edit: Also if anyone knows how to make it start with the GUI on the server's end as well, instead of everything just appearing on the Pi's terminal, that'd be fantastic.

Link to comment
Share on other sites

Link to post
Share on other sites

Little confused what you're asking for, it sounds like you're talking about BeamMP in particular is having issues?

So does BeamMP have a client on your PC that uses SSH to connect to the server? 

Is SSH working normally if you use something like PuTTy / MobaXTerm to connect? 

 

If so is there a screenshot or something of the settings / config for the connection? 

Spoiler

Desktop: Ryzen9 5950X | ASUS ROG Crosshair VIII Hero (Wifi) | EVGA RTX 3080Ti FTW3 | 32GB (2x16GB) Corsair Dominator Platinum RGB Pro 3600Mhz | EKWB EK-AIO 360D-RGB | EKWB EK-Vardar RGB Fans | 1TB Samsung 980 Pro, 4TB Samsung 980 Pro | Corsair 5000D Airflow | Corsair HX850 Platinum PSU | Asus ROG 42" OLED PG42UQ + LG 32" 32GK850G Monitor | Roccat Vulcan TKL Pro Keyboard | Logitech G Pro X Superlight  | MicroLab Solo 7C Speakers | Audio-Technica ATH-M50xBT2 LE Headphones | TC-Helicon GoXLR | Audio-Technica AT2035 | LTT Desk Mat | XBOX-X Controller | Windows 11 Pro

 

Spoiler

Server: Fractal Design Define R6 | Ryzen 3950x | ASRock X570 Taichi | EVGA GTX1070 FTW | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM850v2 PSU | Fractal S36 Triple AIO | 12 x 8TB HGST Ultrastar He10 (WD Whitelabel) | 500GB Aorus Gen4 NVMe | 2 x 2TB Samsung 970 Evo Plus NVMe | LSI 9211-8i HBA

 

Link to comment
Share on other sites

Link to post
Share on other sites

On 2/8/2024 at 9:49 PM, Jarsky said:

Little confused what you're asking for, it sounds like you're talking about BeamMP in particular is having issues?

So does BeamMP have a client on your PC that uses SSH to connect to the server? 

Is SSH working normally if you use something like PuTTy / MobaXTerm to connect? 

 

If so is there a screenshot or something of the settings / config for the connection? 

So, using PuTTY and MobaXTerm on my main PC, I can connect and run it. Using PuTTY on the server itself also works and on the Pi. I believe it's just the SSH command itself that's having trouble. I am also using sshpass to autofill the password, which could be causing issues. I can use the ssh command itself in a terminal on the Pi and cd into the server’s directory to run it as well.

 

I run the BeamMP client on my PC and the BeamMP-server.exe file on my server to play. Instead of clicking that .exe myself, I want my friends on my website to click a button to start the BeamMP server if they want to play when I’m not able to start it.

 

Here's the code for the program it runs when that button is pressed:

#!/bin/bash 


# password and target

password='pass' 

target='brown@192.168.1.26' 


# server path

filelocation='C:\\Users\\the big fella\\Desktop\\BeamMP\\BeamMP-server.exe' 


# run sshpass and run the file at the location

sshpass -p "$password" ssh "$target" "cd /d $(dirname "$filelocation") && cmd /c \"$filelocation\""

 

Edited by iGPR3
Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×