Setup Info
I am using Hyper-V to spawn Ubuntu live 22.04 VMs. During the installation procedure it asks if I want to Install OpenSSH server, whether I select this option only results in one change. The change: Cloud init creates a conf file in the /etc/ssh/sshd_config.d/
called 50-cloud-init.conf
. There might be other changes, but this is the only change I have noticed.
the contents of 50-cloud-init.conf
PasswordAuthentication yes
VM that doesn't have OpenSSH option checked
sudo systemctl status sshd
test@bingbong [19:07:22] [/etc/ssh/sshd_config.d]
-> % sudo systemctl status sshd
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2023-10-05 17:40:55 UTC; 1h 26min ago
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 909 (sshd)
Tasks: 1 (limit: 2140)
Memory: 6.7M
CPU: 100ms
CGroup: /system.slice/ssh.service
└─909 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"
Oct 05 17:40:55 bingbong systemd[1]: Started OpenBSD Secure Shell server.
Oct 05 17:41:38 bingbong sshd[1281]: Accepted publickey for test from 192.168.0.28 port 51602 ssh2: RSA SHA256:wm5N8Nv0>
Oct 05 17:41:38 bingbong sshd[1281]: pam_unix(sshd:session): session opened for user test(uid=1000) by (uid=0)
Oct 05 18:02:01 bingbong sshd[3090]: Connection closed by 192.168.0.28 port 62394 [preauth]
Oct 05 18:02:38 bingbong sshd[3092]: Connection closed by 192.168.0.28 port 62395 [preauth]
Oct 05 18:03:14 bingbong sshd[3096]: Accepted publickey for test from 192.168.0.28 port 51604 ssh2: RSA SHA256:wm5N8Nv0>
Oct 05 18:03:14 bingbong sshd[3096]: pam_unix(sshd:session): session opened for user test(uid=1000) by (uid=0)
Oct 05 18:12:52 bingbong sshd[3692]: Connection closed by 192.168.0.28 port 62466 [preauth]
Oct 05 18:13:04 bingbong sshd[3694]: Accepted publickey for test from 192.168.0.28 port 51592 ssh2: RSA SHA256:wm5N8Nv0>
Oct 05 18:13:04 bingbong sshd[3694]: pam_unix(sshd:session): session opened for user test(uid=1000) by (uid=0)
VM that does have OpenSSH option checked
test@worker1:~$ sudo systemctl status sshd
[sudo] password for test:
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2023-10-05 17:51:50 UTC; 1h 14min ago
Docs: man:sshd(8)
man:sshd_config(5)
Process: 1427 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 1428 (sshd)
Tasks: 1 (limit: 2140)
Memory: 4.0M
CPU: 26ms
CGroup: /system.slice/ssh.service
└─1428 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"
Oct 05 17:51:50 worker1 systemd[1]: Starting OpenBSD Secure Shell server...
Oct 05 17:51:50 worker1 sshd[1428]: Server listening on 0.0.0.0 port 22.
Oct 05 17:51:50 worker1 sshd[1428]: Server listening on :: port 22.
Oct 05 17:51:50 worker1 systemd[1]: Started OpenBSD Secure Shell server.
Oct 05 19:06:04 worker1 sshd[1650]: Accepted password for test from 192.168.0.188 port 50394 ssh2
Oct 05 19:06:04 worker1 sshd[1650]: pam_unix(sshd:session): session opened for user test(uid=1000) by (uid=0)
Issue
What is the use of checking the option Install OpenSSH Server during the installation of a Ubuntu Live Server 22.04? what am I missing?