Skip to content

Troubleshooting Guides

Benedetta edited this page Dec 26, 2022 · 6 revisions

Here are a few step-by-step troubleshooting guides about specific issues you might encounter. This is a living document and will continue to be updated as issues arise and get resolved.

Issues SSH-ing into Server

So you can't ssh into your server and you receive an error when trying, here are a few things you might want to try.

SSH Error

  1. Before you embark on opening up your server box, I think it would be worthwhile to reach out to other folks on the Solar Protocol team to see if they are able to ssh into your server as additional troubleshooting help.
  2. The first quick thing to check would be whether or not port 22 on the router is still open. Possible tools to double-check check port forwarding are You Get Signal or Port Checker by entering your server's unique IP address and checking for port 22 [ssh] and port 80 [connection to the outside network].
  3. If the ports are NOT open, you should proceed to log into your router settings and modify access to those ports. If the ports look like they are currently open you can try following the next steps below.
  4. The next item to check is whether or not the ECDSA key of the device you are trying to ssh from is saved correctly on your server in order to allow authentication and access. To do so please follow these steps in order:
  • The first step is to check if your key is in the authorized_keys files, and if not add it to it by going to /home/pi/solar-protocol/utilities/authorized_keys and editing this file by issuing sudo nano /home/pi/solar-protocol/utilities/authorized_keys
  • After editing and saving the modified file you want to restart the server with sudo reboot
  • After rebooting you might still run into permission issues so make sure you also issue the following commands in order to move the authorized_keys file into the main directory with sudo mv /home/pi/solar-protocol/utilities/authorized_keys ~/.ssh/authorized_keys
  • After moving the file you want to set the correct permissions by running sudo chmod 644 ~/.ssh/authorized_keys AND sudo chown pi:pi ~/.ssh/authorized_keys. The system won't return anything if it worked correctly.
  • Lastly all the necessary file and directory permissions can be set by running one script contained in utilities/setAllPermissions.sh by navigating to that directory and issuing sh setAllPermissions.sh
  • You can reboot one more time to make sure that all the settings have been saved with sudo reboot and hopefully you have now regained access to your server through ssh!