UPDATE: user error.
In dietpi.txt:
##### Software Options #####
# SSH server choice: 0=none/custom | -1=Dropbear | -2=OpenSSH
AUTO_SETUP_SSH_SERVER_INDEX=-2
…
# Software to automatically install
# - List of available software IDs: https://github.com/MichaIng/DietPi/wiki/DietPi-Software-list
# - Add as many entries as you wish, one each line.
# - DietPi will automatically install all pre-reqs (e.g. ALSA/X11 for desktops etc)
# - E.g. the following (without the leading "#") will install the LXDE desktop automatically on first boot:
# OpenSSH Client
AUTO_SETUP_INSTALL_SOFTWARE_ID=0
…
# OpenSSH Server
AUTO_SETUP_INSTALL_SOFTWARE_ID=105
However the credentials documented here:
https://dietpi.com/docs/software/ssh/#openssh
… are not working.
Note: I do have this as well:
# Fail2Ban
AUTO_SETUP_INSTALL_SOFTWARE_ID=73
Is there possibly an issue with the default Fail2Ban config?
Have not knowingly installed a firewall and only attempting to access DietPi via LAN.
Would use authorised_keys but not seeing an option for that, so I guess I need to write a separate script.
Please let me know if I can help.
Maybe you like to share what image you are running. RPI or some other device? 32bit or 64bit?
Would use authorised_keys but not seeing an option for that, so I guess I need to write a separate script.
There is no option in DietPi so automatically use SSH keys. This would need to be setup manually.
REMOVED OBSOLETE LINK
Downloaded on 23rd July 2021.
aarch64
If that is not 7.4.2 out of the box, which I doubt, than DietPi is self-upgrading to 7.4.2 automatically, as is no doubt intended.
Hardware is a DeskPi Pro with an RPi4 including 4GB RAM.
Installation method:
balenaEtcher creates the image on a SanDisk 32GB Ultra USB stick with a USB3 interface and it’s plugged into a USB3 port.
Currently booting to a logged in screen as root.
Using PuTTY from a Windows 10 laptop on the same network. Have connected to a previous DietPi instance via OpenSSH using PuTTY.
PuTTY receives a username prompt as I do not have that pre-filled. I type in root and the the Password prompt. I type in what I think is the password and PuTTY just hangs until it times out.
Then, subsequent new PuTTY windows fail to display even a Login (username) prompt.
shutdown -r now
Wow, still no Login prompt, just a quick timeout.
sshd, fail2ban are confirmed to be running via htop.
Set the log system to full. /var/log/fail2ban.log remains empty whilst /var/log/auth.log does contain references to the failed logins.
So I changed the root passwd and it still failed.
Checked /etc/ssh/sshd_config:
PermitRootLogin yes
All very strange!
I did an automated test installation and for me it’s working without issues.
can you check following
journalctl -u ssh.service
fail2ban-client status sshd
if you did to many failed logins, you most probably got blocked by fail2ban now
Looks like fail2ban was kicking in as suggested.
Must have chased my tail when trying passwords. There’s possibly three that I thought may apply. One from dietpi.txt; the default dietpi password; the password I changed to via console to force a known password.
Apologies for wasting your time. This thread may be possibly best deleted to remove rubbish from people’s searches and browsing for real issues.
there is just a single root password. You would need to use the new one as soon as you have changed it via one of the available methods. ![:slight_smile: :slight_smile:](/forum/images/emoji/twitter/slight_smile.png?v=12)