0

So recently I brought a pc for pretty cheap to use as a Minecraft server. I plan to set it up with Ubuntu server. I want to be able to send commands to it (to start the server, change things, stop the server) and I want to be able to turn on the pc and turn it off. The thing is that I want to put this pc/server somewhere next to my router and I don't want to have connect a moinitor and keyboard and mouse to it whenever I want to change something with it. I want to able to connect to it from my Windows 10 pc. Both the Windows 10 pc and the Ubuntu server will be at home (locally) but I want to be able to connect it without giving access to the people who connect to the game server. When researching this on Google I found out about ssh but every single article I find that tell you how to use and setup ssh seems to be using it for remote connection. I am also worried that by using ssh that once I give my IP address of the server to the people that will join it (via port forwarding) that they will be able to remote into the server and change things. Which is obviously not ideal and not that secure. So to sum up, I want to be able to connect to my server locally and send commands to it, etc. Without giving access to other people. Many thanks in advance and I am sorry if I haven't included enough information as I am new here and don't really know how to explain my problem.

1 Answers1

1

So I understand the scenario is as follows (please correct me if I'm wrong):

  • both Windows PC and Ubuntu PC are in home LAN
  • there is port forwarded on your router from outside to the game server port on Ubuntu PC (ONLY the port used by game server is forwarded, ssh port is NOT forwarded)
  • people who will use the game server will connect from outside via the forwarded port, NOT from your Windows PC
  • you want to connect to Ubuntu PC and control it from your Windows PC, but NOT from the outside

In that case, you can safely connect from your Windows PC to your Ubuntu PC via ssh, because the ssh port to your Ubuntu PC is not forwarded, so there is no possibility to connect to it from outside.

Also bear in mind that ssh connection requires username and password, so even if someone is able to connect to ssh port on your server, they need the username and password to actually log in (and you have no reason to give them username and password).

You need to install a ssh client on Windows (it comes default with Windows 10, but you need to enable it) and ssh server on Ubuntu.

The only thing you will NOT be able to accomplish via ssh is to turn the PC on, because once you turn it off, there is no software running that will listen on ssh port and execute your commands. However, you could use Wake-on-LAN feature to turn it on, but this is a completely different topic and not quite Ubuntu related.

raj
  • 10,353
  • Thank you for the quick reply.You did understand me correctly. And now I know that you can use ssh for local and remote connection. I can't believe I didn't think of that before. I just thought that it is just remote because all of the articles on how to set it up were about using ssh to connect to a pc/server from anywhere. Thanks very much for clarifying this. – AstonMartin Nov 16 '20 at 14:05