Configuring Static IP on Raspberry Pi using `nmcli`
To set a static IP address on your Raspberry Pi via the command line, use the NetworkManager command-line interface tool `nmcli`.
To apply the changes and restart the network interface, run:
Replace <connection-name>
with the actual network connection name you wish to configure.
Reverting to DHCP on Raspberry Pi using `nmcli`
To change the configuration from a static IP to DHCP on your Raspberry Pi, use the following `nmcli` commands:
Reactivate the networking connection to apply the new settings:
For more details about `nmcli`, visit the official documentation.
SSH Port Forwarding and Remote Access
To access your Raspberry Pi via SSH remotely:
- Configure your router to forward an external port (e.g., 22000) to the internal SSH port of your Raspberry Pi (port 22).
- Connect via SSH using the command:
Replace <Your-External-IP-Address>
with your public IP and <External-Port>
with the port you chose for external access.