ssh login problem Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
dirkdeb
Posts: 3
Joined: Sat Mar 07, 2020 10:35 am

ssh login problem

Post by dirkdeb »

I need help with configuration of Openssh-server..please

After a succesful DietPi with Openssh server installation a putty ssh login gives following error:
Access denied
As I am inside a firewall on my own on the network, I am not concerned about security...for now :)
My /etc/ssh/sshd_config is the default/as installed config file.
Accept for following changes:
PermitRootLogin yes
PasswordAuthentication yes
usePAM no .. I changed this default because I got a PAM authentication failure with that enabled

I did useradd user1, passwd user1 .
The users login/password were tested successfully
Tried to ssh with putty and login as root and user1 with the same result: Access denied

journalctl -xe |grep ssh
Failed password for root from 192.168.1.100 port 500356 port 22 [preauth]
Same for user1

I telnet to my DietPi box with telnet 192.168.1.100 22 with response:
SSH-2.0-OpenSSH_7.9p1 Rasbian-10+deb10u2

So.. the firewall and network access is fine, ssh server service is running

Thanks in advance
User avatar
Joulinar
Posts: 2085
Joined: Sat Nov 16, 2019 12:49 am

Re: ssh login problem

Post by Joulinar »

Hi,

how did you install OpenSSH? Did you used dietpi-software to change SSH Server preference from Dropbear > OpenSSH??

I tested it on one of my Demo VM's and it was working out of the box without any configuration needed. Just switched the SSH Server, reboot, done.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
dirkdeb
Posts: 3
Joined: Sat Mar 07, 2020 10:35 am

Re: ssh login problem

Post by dirkdeb »

Yip
I first installed Dropbear via dietpi-software and had the same problem so I thought I previously worked with Openssh and then changed it
through dietpi-software to OpenSSH

You think, maybe I must uninstall Dropbear and Openssh via dietpi-software , reboot and try again via dietpi-software ?

Thanks again
User avatar
Joulinar
Posts: 2085
Joined: Sat Nov 16, 2019 12:49 am

Re: ssh login problem

Post by Joulinar »

Hi,

usually there is an option inside dietpi-software that automatically will remove the not needed SSH Server. No need to do it via Software Optimised
┌──────────────┤ DietPi-Software ├──────────────────┐

│ Help! : Links to online guides, docs and information
│ DietPi-Config : Feature-rich configuration tool for your device
│ ●──────────── Select Software ────────────────────●
│ Search : Find a software title for installation
│ Software Optimised : Select DietPi optimised software for installation
│ Software Additional : Select additional Linux software for installation
SSH Server : [Dropbear]
│ File Server : [None]
│ Log System : [DietPi-Ramlog #1]
│ Webserver Preference : [Lighttpd]
│ User Data Location : [SD/eMMC | /mnt/dietpi_userdata]
│ ●────────── Install or Remove Software ───────────────●
│ Uninstall : Select installed software for removal
│ Install : Go >> Start installation for selected software
Means: If you select OpenSSH, Dropbear will be removed. And if you select Dropbear, OpenSSH will be removed. In general, you should have one SSH server only active as both will try to run on same port 22, which might be conflicting.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
dirkdeb
Posts: 3
Joined: Sat Mar 07, 2020 10:35 am

Re: ssh login problem

Post by dirkdeb »

Thanks for the reply.
I got hold of the login problem.
I did as you suggest with dietpi-config but the login denied problem stayed.
This morning I realised I added the users via a usb pluged in keyeboard that was wrongly configured..(EN.uk ans should be EN.us) .sooo the password configured via the keyboard and the ssh session login from the notebook' s password did not corespond : )

Never too old ..
Post Reply