devryan / GamePanelX-V3

The Original Free and Open Source Game Control Panel
https://www.gamepanelx.com
Other
131 stars 94 forks source link

Failed: Remote Failed: Remote: Login to the Remote Server failed! #156

Closed nickdodd25 closed 7 years ago

nickdodd25 commented 7 years ago

Hi there i have a gamepanelx remote installed on one vps and the master installed on another vps.

On the remote vps i have ssh port switched to an alternate port. When i add the remote server via the Create Network Server feature on the master, everything goes great with no issues. I can install/remove templates to the remote just fine (But i do have issues sometimes as it seems i am reaching the php timeout limit on the master, pretty sure i just need to adjust some settings). But everything seems to work great, exept for when i go to install a server to the remote. I get error Failed: Remote Failed: Remote: Login to the Remote Server failed! panelhelp1 Here are the settings i have for when i added the remote server. panelhelp2

But what i don't get is how can it sucsessfuly log into the remote and install a template, but it cannot login to the remote to install a server? Also the log file for the remote is empty.

This is the ssh log.

Feb 3 00:34:18 teamshri sshd[19682]: pam_unix(sshd:session): session opened for user panel by (uid=0) Feb 3 00:34:18 teamshri sshd[19685]: Received disconnect from REMOTEIPHERE: 11: Feb 3 00:34:18 teamshri sshd[19682]: pam_unix(sshd:session): session closed for user panel Feb 3 00:34:18 teamshri sshd[19703]: Received disconnect from REMOTEIPHERE: 11: Feb 3 00:34:18 teamshri sshd[19704]: Did not receive identification string from REMOTEIPHERE

I have used the same master install with a different remote once before, and the only difference was the ssh port.

Anyone have some suggestions on what i should do to possibly fix this?

Thanks Nick

devryan commented 7 years ago

Hey there - so, when it logs in to create a template, that uses the 'gpx' user you created during installation of the Remote. When it SSH's in for your gameserver creation/start/stop, it uses the actual linux system account for your gameserver user - in this case it would be 'gpxpanel' - they have 'gpx' prefixed on them.

Can you show your /etc/ssh/sshd_config?

nickdodd25 commented 7 years ago

Ah i seem to have fixed it now that i know that info.

Wouldn't it be better to use the username that the remote server is installed on, than it would be to use gpx?

For example make it so its panelexampleuser not gpxexampleuser replace panel with whatever username the remote is installed as.

devryan commented 7 years ago

I mean, that's just the convention I used. What did you do to fix it, just incase someone has the same issue?

nickdodd25 commented 7 years ago

I ended up reinstalling the remote with the default username of gpx. And since i use keys for my other accounts i had a match block in sshd_config for the panel account that allowed the use of a password. I simply changed it to look like this. Match user gpx* PasswordAuthentication yes PubkeyAuthentication no