Announcement

Collapse
No announcement yet.

How to access and control a remote RPi

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to access and control a remote RPi

    I am installing a new RPi in another house with a private network that is obviously different from my home network.
    How do I manage the remote RPi using SSH from my home ?

    Thank you very much!​

  • #2
    The easiest way is to forward the port of your RPi's SSH on the router and then connect to publicIP:forwardedPort of that network from your remote location. You have remember in that case that you are exposing this port to the world so very strong password is a must and, as a second security measure, you can use random no-default 22 port to forward outside.

    Other more secure but more complicated solution is to set up VPN server on the remote RPi and tunnel to it for SSH.

    One more thing, if you are forwarding SSH port MAKE SURE root over SSH is disabled.
    Last edited by d4niel_p; 2024-01-17, 16:39.

    Comment


    • #3
      Thank you for your reply. I'll try using publicIP and a non-trivial port number. VPN is definitely too complicated.

      Originally posted by d4niel_p View Post
      One more thing, if you are forwarding SSH port MAKE SURE root over SSH is disabled.
      I looked at how to disable root over SSH. Unfortunately, the file on my RPi is slightly different from the instructions.

      I expected #PermitRootLogin no​ but the config files reads #PermitRootLogin prohibit-password. Any clue ?

      Thanks!

      Comment


      • #4
        Oh, I forgot it was changed in Stretch iirc. Argument prohibit-password specifies that basically it's possible to login as root only with SSH keys, so relatively safe. Although, imo it's a good practice to not use root in remote connections (or at all), so I'd uncomment the line and change the keyword to no. Just set it and forget it.

        Comment

        Working...
        X