Comments (9)
Oh I am sorry, armbian. I am currently flashing the latest version.
But it happened twice, so I dont think it was a coincidence, but we will see with the latest image.
Thanks for reacting so fast.
from dietpi.
Which Debian version is this? On all versions we support, the natively provided OpenSSH can be purged without aborting the current SSH session. See here:
root@DietPi:~# ss -tulpn
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
tcp LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=3675,fd=3))
tcp LISTEN 0 128 [::]:22 [::]:* users:(("sshd",pid=3675,fd=4))
root@DietPi:~# tty
/dev/pts/0
root@DietPi:~# echo $SSH_CLIENT
192.168.1.11 54059 22
root@DietPi:~# apt autopurge openssh-server
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
libnsl2* libwrap0* openssh-server* openssh-sftp-server* runit-helper*
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
After this operation, 2457 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 16024 files and directories currently installed.)
Removing openssh-server (1:9.2p1-2+deb12u2) ...
Removing libwrap0:amd64 (7.6.q-32) ...
Removing libnsl2:amd64 (1.3.0-2) ...
Removing openssh-sftp-server (1:9.2p1-2+deb12u2) ...
Removing runit-helper (2.15.2) ...
Processing triggers for libc-bin (2.36-9+deb12u3) ...
(Reading database ... 15974 files and directories currently installed.)
Purging configuration files for openssh-server (1:9.2p1-2+deb12u2) ...
dpkg: warning: while removing openssh-server, directory '/etc/ssh/sshd_config.d' not empty so not removed
Purging configuration files for libwrap0:amd64 (7.6.q-32) ...
root@DietPi:~# tty
/dev/pts/0
root@DietPi:~# echo $SSH_CLIENT
192.168.1.11 54059 22
root@DietPi:~# ss -tulpn
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
root@DietPi:~#
You see the "Purging configuration files for openssh-server", but no connection loss 🤔. We allow to switch back and forth between OpenSSH and Dropbear from SSH sessions, and I am not aware of anyone reporting issues with this.
At some point I plan to restructure the dietpi-installer
to install new packages first and remove obsolete one afterwards. In case of the SSH server, this would mean that we need to stop the OpenSSH service at least, otherwise Dropbear could not be installed, or we would need to temporarily mask the Dropbear service to prevent it from trying to start. If you find time to test: With the fresh BananaPi image you use, does stopping the OpenSSH server process as well abort the connection?
systemctl stop ssh
This as well works fine on Debian/DietPi, as a mandatory step to allow switching between SSH servers.
EDIT:
I have installed raspbian on a bananapi m1
Oh, in case I understand correctly, and as I saw "Raspbian" images provided by other Chinese SBC vendors: Better use Armbian or some plain Debian, not the rubbish (sorry, but I cannot name it any different) "Raspbian" labeled images Banana Pi is probably providing. "Raspbian" is an APT repository clone of Debian, with binaries compiled explicitly for the very first Raspberry Pi models, which run this unique ARMv6hf CPU architecture that is not supported by Debian. Shipping an image for an ARMv7-capable SBC, which is not an RPi, and even adding the archive.raspberrypi.org
repo with the RPi-only kernel and bootloader, and even (as I saw on other such images) having the RPi-only kernel and bootloader packages pre-installed on this image (of course unused, as they cannot work on anything else than RPi), is so below any reason and quality standards. One could just use Debian armhf
. For theses image, I cannot guarantee for anything, and do not wonder that any sorts of strange issues appear 😄.
Better use the Armbian Bookworm CLI image as a starting point: https://www.armbian.com/bananapi/
Having screen and keyboard attached is still a good idea, since there is currently an issue with DNS resolution being temporarily stopped, as Armbian images use a different network stack. But this is something we are currently investigating and should be able to solve soon.
from dietpi.
purging here is succesfull too.
Yet the script is not
lsb_release -a
root@bananapi:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Armbian 23.08.0-trunk bookworm
Release: 12
Codename: bookworm
tcp LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=2113,fd=3))
tcp LISTEN 0 4096 [::]:111 [::]:* users:(("rpcbind",pid=573,fd=6),("systemd",pid=1,fd=113))
tcp LISTEN 0 128 [::]:22 [::]:* users:(("sshd",pid=2113,fd=4))
root@bananapi:~# ps waux | egrep ssh
root 2113 0.0 0.5 10584 5700 ? Ss 18:45 0:00 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
root 2141 0.6 0.7 13168 7172 ? Ss 18:46 0:01 sshd: root@pts/0
root 2686 33.3 0.1 6844 1620 pts/0 S+ 18:50 0:00 grep -E ssh
root@bananapi:~#
root@bananapi:~# /usr/sbin/sshd --version
unknown option -- -
OpenSSH_9.2p1 Debian-2, OpenSSL 3.0.9 30 May 2023
root@bananapi:~# echo $SSH_CLIENT
192.168.0.2 46374 22
root@bananapi:~# apt autopurge openssh-server
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
libproc2-0* openssh-server* openssh-sftp-server* procps* runit-helper*
0 upgraded, 0 newly installed, 5 to remove and 1 not upgraded.
After this operation, 4,599 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 40394 files and directories currently installed.)
Removing openssh-server (1:9.2p1-2) ...
Removing procps (2:4.0.2-3) ...
Removing libproc2-0:armhf (2:4.0.2-3) ...
Removing openssh-sftp-server (1:9.2p1-2) ...
Removing runit-helper (2.15.2) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9) ...
(Reading database ... 40196 files and directories currently installed.)
Purging configuration files for openssh-server (1:9.2p1-2) ...
Purging configuration files for procps (2:4.0.2-3) ...
root@bananapi:~#
from dietpi.
Then it was probably a coincidental network issue, since the script does just exactly this.
Description: Armbian 23.08.0-trunk bookworm
So you did use Armbian in the first place? Because you said "Raspbian".
from dietpi.
it died again but somewhere else.
I am going to assume a bad card now. I will let you know here if a new card fixes this.
Purging configuration files for libsensors-config (1:3.6.0-7.1) ...
Purging configuration files for libmagic1:armhf (1:5.44-3) ...
Purging configuration files for bc (1.07.1-3) ...
Purging configuration files for screen (4.9.0-4) ...
removed '/etc/tmpfiles.d/screen-cleanup.conf'
Purging configuration files for rpcbind (1.2.6-6+b1) ...
from dietpi.
Hmm. Tried it now running without ssh directly on the bananapi with screen and keyboard.
It died just before doing "apt install " lots of packages including dropbear.
I started a shell and the interface was up, but no ip address and route. So looks like dhcp does not work.
Added ip address and default route and script is now running installing things.
Probably the dns bug you mentioned. It causes interface problems which kills any ssh session of course.
from dietpi.
I guess so. I'll try to replicate in a few days and apply a fix. I was able to replicate (and understand from NetetwokManager postrm
script) why DNS is lost, but not that/why the IP address or default route would go. While we can add a generic public DNS server, we would need to find a way to keep the previously set IP address and route. In case just hack the postrm
, if we find the code which does this dumb thing.
from dietpi.
I am just guessing here but my ethernet device was called end0 before dietpi took over armbian.
After installing its called eth0.
I have disabled wifi while setting up dietpi
but /etc/networks/interfaces shows both Ethernet and WIFI and they both look enabled (I have changed to a fixed ip after installing dietpi).
It might be the script tried to put the dhcp information to the wifi network (I had disabled)
By the way on my network neither ntp not dns traffic is allowed to internet.
My dhcp server prescribes gateway 192.168.0.11 and dns 192.168.0.17
This is the interfaces file
# Ethernet
allow-hotplug eth0
iface eth0 inet static
address 192.168.0.76
netmask 255.255.255.0
gateway 192.168.0.11
#dns-nameservers 192.168.0.12
# WiFi
#allow-hotplug wlan0
iface wlan0 inet dhcp
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
#dns-nameservers 192.168.0.17
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
greetings
Hans-Cees
from dietpi.
The renamed network interfaces are expected, but this should not affect the dietpi-installer
since it takes effect only after reboot. It is expected that /etc/network/interfaces
contains those two interface definitions, but the WiFi interface is only enabled and in case edited at first boot if setup via dietpi.txt
.
from dietpi.
Related Issues (20)
- Proxmox 8 installation on Raspberry Pi 4 (with 4 or 8 GB RAM) andd using DietPi as VM in arm64 Architectur
- DietPi-Software | Sonarr: Migrate to v4 HOT 8
- Open Beta v9.0 | Please help testing and hardening our upcoming release HOT 2
- DietPi-Update | SSH connection fails during APT update HOT 11
- FileBrowser installed can't login HOT 3
- Chromium in kiosk mode: autodetect screen resolution HOT 1
- Permit weekly backups in dietpi-backup HOT 4
- dietpi-update fails on Quartz64 Model A from 8.xx to 9.02 HOT 14
- Failed to stop avahi while installing Kodi HOT 3
- New Kodi version HOT 5
- Error update dietpi 8.25.1 to 9.0.2 raspberry pi 4 HOT 9
- Iteration v9.1 (2024-02-17)
- Upgrade to Dietpi 9 on RISC triggers cp bug HOT 3
- LXD brings network interfaces down on container stop HOT 18
- Image | Home Assistant Green HOT 4
- Mosquitto installation: Password file setting fails since v9.0 HOT 3
- Feature Request: Add option to integrate screen/byobu/etc. into console by default HOT 2
- Add OliveTin to Software
- dietpi_update problem HOT 6
- Raspberry PI 4 + DietPi = problem with "kiauh" HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dietpi.