SSH configuration
Last updated
Was this helpful?
Last updated
Was this helpful?
Open the file /etc/dhcpcd.conf
and place the following lines of code, which configures the connection using the eth0
(ethernet) interface:
In the example above, we have used 192.168.1.X/24
as the static private IP and 192.168.1.1
is the IP of our router (a.k.a. gateway, check it using router -n
command).
Finally, restart the device
A good practice to increase security is to change the default ssh port (22) to a different one (higher than 1000, lower than 65535). Open the ssh configuration (file /etc/ssh/sshd_config) and uncomment the line called “Port 22” and change it to
Finally, restart ssh service
Now, to access the raspberry type: