2

I have a default Ubuntu Server 22.04 installation (haven't done anything on it yet). SSH is working fine with default configuration on server's dynamic local IP.

I then set up a new netplan configuration file with static IP as seen here : https://ubuntu.com/server/docs/network-configuration

Here is my netplan configuration file /etc/netplan/99_config.yaml :

  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: no
      addresses:
        - 172.26.50.150/24
      routes:
        - to: default
          via: 172.26.50.1
      nameservers:
          search: [example.com, sales.example.com, dev.example.com]
          addresses: [172.26.50.30, 172.26.50.50]

I then use sudo netplan apply to apply the configuration. Which works as the DHCP ip is not responding anymore, and the new IP pings well.

However :

  • I'm not able to connect SSH on the new static IP
  • If I revert the netplan configuration to the original DHCP one, SSH is working again

My SSH config file is the default openssh-server one, with no limitation (ListenAddress etc...)

I tried to sudo apt-get purge openssh-server and then sudo apt-get install openssh-server as another topic on the internet suggests but I'm still having the same issue.

I tried to have a netplan conf that allow DHCP + Static IP, and while both IP respond properly on the network, only DHCP's IP would allow SSH connections.

What am I missing ?

1 Answer 1

2

I found out I had a duplicate IP on my network, so whenever I was trying to connect to my Ubuntu server I was in fact trying to connect a Windows server that would refuse any SSH attempt. Ashamed but relieved, everything is working fine with another IP address.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .