@Joulinar
@Jappe
I followed the instructions and modified /boot/dietpi.txt
still cannot connect.
Below is the following things I changed.
# Set to "1" to convert DHCP leased network settings into static settings automatically on first boot.
AUTO_SETUP_DHCP_TO_STATIC=1
# Enter your static network details below, if applicable.
AUTO_SETUP_NET_USESTATIC=1
AUTO_SETUP_NET_STATIC_IP=192.168.0.100
AUTO_SETUP_NET_STATIC_MASK=255.255.255.0
AUTO_SETUP_NET_STATIC_GATEWAY=192.168.0.1
AUTO_SETUP_NET_STATIC_DNS=9.9.9.9 149.112.112.112
##### Software options #####
# SSH server choice: 0=none/custom | -1=Dropbear | -2=OpenSSH
AUTO_SETUP_SSH_SERVER_INDEX=0
# SSH server pubkey
# - Public key(s) for "root" and "dietpi" users, which will be added to ~/.ssh/authorized_keys
# - Use the same setting multiple times for adding multiple keys.
# - See SOFTWARE_DISABLE_SSH_PASSWORD_LOGINS below for disabling SSH password logins.
#AUTO_SETUP_SSH_PUBKEY=ssh-ed25519 AAAAAAAA111111111111BBBBBBBBBBBB222222222222cccccccccccc333333333333 mySSHkey
On my host pc, I edited etc/network/interfaces to
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 192.168.0.1
also tried
iface eth0 inet static
address 192.168.0.99
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 192.168.0.1
also tried swapping nameservers on both configs above with
dns-nameservers 9.9.9.9 149.112.112.112
still cant connect to ssh via PuTTy, returning connetion refused
When I completely remove the iface eth0 inet static block from my host pc, the ethernet adapter doesnt connect, it stays stuck on connecting and then shows failed to connect
What could be the problem?
Side note: If you use Linux, I strongly advise against Ethernet adapters with the RTL8153 REALTEK chipset - the most common.
I suspect this maybe causing problems itself, they are the most common but not out-of-box compatible with linux, I had to manually download drivers.