Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommended way to setup Wifi after v24.04 server successful install #153

Open
ccgarant opened this issue Nov 18, 2024 · 7 comments
Open

Comments

@ccgarant
Copy link

What is the recommended way to setup a wifi or ethernet connection after successful install? I also ran into this issue with v22 server install. If netplan in /etc/netplan what is the recommended filename? Also, is there a group name to set them UP? (E.g. sudo ip link set wlp1s0f0 up)

I have a mac mini m1 with ip a of end0 and wlp1s0f0.

ip a
...
end0: <BROADCAST, MULTICAST> MTU 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00: ....
altname enp3s0
...
wlp1s0f0: <BROADCAST, MULTICAST> MTU 1500 qdisc noop state DOWN group default qlen 1000
...

@tobhe
Copy link
Member

tobhe commented Nov 18, 2024

The netplan docs have a wifi example that should almost work. On Ubuntu Server you need to use renderer: networkd. renderer: NetworkManager won't work because NetworkManager is not installed.

It should looks something like:

network:
  version: 2
  renderer: networkd
  wifis:
    wlp1s0f0:
      dhcp4: yes
      access-points:
        "network_ssid_name":
          password: "**********"

The file name doesn't matter as long as in ends in .yaml and is placed in /etc/netplan/, so default.yaml or wifi.yaml should both work.

EDIT: after creating the file you will have to run netplan apply to apply it.

@eslerm
Copy link
Member

eslerm commented Nov 18, 2024

I "replace" netplan by installing network manager and:

$ cat /etc/NetworkManager/conf.d/manage-all.conf 
[keyfile]
unmanaged-devices=none
$ # delete other /etc/netplan/*.yaml
$ sudo cat /etc/netplan/00-nm.yaml
network:
  version: 2
  renderer: NetworkManager
$ sudo netplan generate
$ sudo netplan apply
$ sudo systemctl disable systemd-networkd-wait-online.service 
$ sudo reboot

@ccgarant
Copy link
Author

Agree but this is assuming you don't have any internet connections yet to install / update.

@ccgarant
Copy link
Author

Still couldn't get wifi up but at least I got ethernet end0 working from the netplan yaml...

@tobhe
Copy link
Member

tobhe commented Nov 19, 2024

@ccgarant if you run ip link set wlp1s0f0 up what does that return? You might need to apt install rfkill and rfkill unblock all.

@ccgarant
Copy link
Author

Thanks @tobhe, I set wlp1s0f0 to "up" and no errors. I installed rfkill and ran those commands, all good.

Now upon sudo systemctl restart ssh (enable and start tried before), there seems to be the following status errors.

Ssh.service not found.

I manually created one and type it into /etc/systemd/system/ssh.service

I've tried sudo apt install openssh-server and there seems to be a dependency package warning.

Upon daemon-reload, and restart ssh, there is another warning.

Ssh.socket not found. Not sure if this is all from openssh-server not installing correctly...

@tobhe
Copy link
Member

tobhe commented Nov 19, 2024

This looks like ssh socket activation: https://discourse.ubuntu.com/t/sshd-now-uses-socket-based-activation-ubuntu-22-10-and-later/30189
in short: instead of managing ssh via the service it is now managed via the ssh.socket. That means systemd starts the service automatically as soon as it sees a network packet arrive on the ssh port. Restart does not exist because a new process is spawned for each connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants