Logging in and SSH

I see some security changes were made to the Raspbian images a while back, disabling SSH by default, however I’m experiencing issues logging into these new images with SSH.

This was on the most recent version of Raspbian Pixel.

I enabled SSH via front-end, but when I Putty in, I get incorrect password.

But the same account credentials work to login locally without issue. When I attempt to change password, it gives me a Token error, usually leading to a ‘sudo passwd’ to force the change, but even after forcing the change, I’m unsure it’s registered because the same error reproduces the next attempt. This makes me thing problem with OS.

Is this new functionality or am I missing something obvious? My Linux understanding is nothing to brag out.

I use a way old version of Noobs that came with my Pi for a Dakboard instance and I never have SSH issues like these; it can be running in my kitchen on WiFi, and I can SSH to it from my PC; but not this OS. Trying to verify that it is OS specific or if I’m missing something obvious/critical.

I will be attempting this and the all-in-one with the Jessie Lite this evening; first attempt at AIO on Raspbian Pixel was issue after issue even after locating a couple of threads that people discovered resolve that worked for them. This SSH fiasco just made installing the AIO 10x lengthier so I was hoping if I was missing something, someone can shed some light to ease the install tonight.

What user are you using? What groups is that user a member of? Did you get a message asking you to accept your security key the first time you tried to login with ssh? Check those for me and I’ll look at my PI when I get home from work and see if we can get farther.

User was Pi. Password, although eventually throwing those token authentication errors upon attempt to change, was changed away from default and did not throw that error upon the first change.

Groups were whatever comes as default, I made no adjustments. I’m ignorant of adjustments to make concerning groups within Linux; I’ll do a bit of reading on this.

I did indeed get a key approval message the first time I attempted login and selected yes.

I appreciate your input.

The problem is likely in your /etc/ssh/sshd_config file. Look for:

PasswordAuthentication no
Allow Groups
Allow Users

You can safely comment out those if they are stopping you from logging in and play with locking it back down later. There are a lot of things that can be configured in sshd_config, so hard to guess at your exact issue.

After you make changes to that file, you need to restart sshd.

I don’t have raspian handy to give you the exact command.

service restart sshd
or
/etc/init.d/ssh restart

The ssh daemon could be called ssh or sshd depending on Linux flavour.

What error are you getting exactly? If you have access to the box directly, you might see the error in /var/log/security or /var/log/messages or /var/log/syslog.

1 Like

Although I plan to tinker with the Jessie Lite here shortly, I threw the Pixel back in to see about this.

I’ve just checked my ssh_config and the latter two fields do not appear to be within the file, but there is a PasswordAuthentication yes, however it is commented out.

Don’t even see a /var/ directory within / to check on those.

Going to keep this SD handy to troubleshoot as it has piqued my curiosity.

Will update with my experience on the Jessie Lite at some point tonight as well.

allow group/user or disallow groups/users is not always in sshd_config. If they are not listed, then everyone in any group is allowed to connect.

Uncommenting PasswordAuthentication yes might be your ticket, but that is a default.

You could do a find for security, but you will likely get a ton of hits…
sudo find / -name security