All device attributes should be saved to the Devices Google sheet.
- Set WiFi Network SSID to sports-replay-wifi-X, where X is the next available Sports Replay WiFi router number in client's building
- Set Jetson Nano host name to sports-replay-ai-X where X is next available Jetson Nano machine ID.
- Set Raspbery Pi host name to sports-replay-pi-X where X is next available Pi machine ID.
- Create unique complex password using password generator. Note that only "Include Lowercase Characters" and "Exclude Similar Characters" should be selected. Also make sure to put the dot at the end of the password, as Raspberry requires at least one special character.
sudo su
Create The Public Key
ssh-keygen -o
Make sure to press ENTER 3 times.
Do not provide any passphrase, otherwise you won't be getting passwordless login.
ssh-copy-id -i ~/.ssh/id_rsa.pub root@IP_ADDRESS_OF_YOUR_SERVER
You will need to provide root password for VPS.
sudo apt install autossh
Raspberry Pi
sudo nano /etc/systemd/system/autossh-tunnel.service
Jetson
sudo vi /etc/systemd/system/autossh-tunnel.service
Paste the following content in it (replace XXXX with the next available VPS port dedicated to tunneling).
[Unit]
Description=AutoSSH tunnel service on port 22
After=network.target
[Service]
Environment="AUTOSSH_GATETIME=0"
ExecStart=/usr/bin/autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -nN -R XXXX:localhost:22 root@IP_ADDRESS_OF_YOUR_SERVER
[Install]
WantedBy=multi-user.target
sudo systemctl start autossh-tunnel.service
sudo systemctl enable autossh-tunnel.service
Reboot
sudo reboot
Open a separate terminal and use the following commands.
ssh root@IP_ADDRESS_OF_YOUR_SERVER
netstat -tulpn | grep LISTEN
For Jetson (replace XXXX with previously assigned VPS port.)
ssh sportsreplay@IP_ADDRESS_OF_YOUR_SERVER -p XXXX
For Raspberry Pi (replace XXXX with previously assigned VPS port.)
ssh pi@IP_ADDRESS_OF_YOUR_SERVER -p XXXX
sudo vi /etc/ssh/sshd_config
- ClientAliveInterval 120
- ClientAliveCountMax 720
Make sure you reboot the device now. Otherwise it will still use the same setting.
sudo systemctl set-default multi-user.target
Make sure you reboot the device now. Otherwise GUI will still be on.
If you need to enable it again, run:
sudo systemctl set-default graphical.target
If you want to start gui, while it is currently disabled, run:
sudo systemctl start gdm3.service
'sudo pip3 install jetson-stats'