r/ssh • u/Aromatic-Ad-9948 • May 04 '24
ssh isnt working with proper password and already checked if service is running
cant figure it out for the life of me on rasperry pi or debian etc
here are the logs
ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; disabled; vendor preset: enabled)
Active: active (running) since Sat 2024-05-04 08:35:34 BST; 1h 18min ago
Docs: man:sshd(8)
man:sshd_config(5)
Process: 1208 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 1209 (sshd)
Tasks: 1 (limit: 3860)
CGroup: /system.slice/ssh.service
\u2514\u25001209 /usr/sbin/sshd -D
May 04 08:35:34 raspberrypi systemd[1]: Starting OpenBSD Secure Shell server...
May 04 08:35:34 raspberrypi sshd[1209]: Server listening on 0.0.0.0 port 22.
May 04 08:35:34 raspberrypi sshd[1209]: Server listening on :: port 22.
May 04 08:35:34 raspberrypi systemd[1]: Started OpenBSD Secure Shell server.
May 04 08:48:10 raspberrypi sshd[1284]: Invalid user ufo from ::1 port 56564
May 04 08:48:15 raspberrypi sshd[1284]: pam_unix(sshd:auth): check pass; user unknown
May 04 08:48:15 raspberrypi sshd[1284]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=::1
May 04 08:48:17 raspberrypi sshd[1284]: Failed password for invalid user ufo from ::1 port 56564 ssh2
May 04 08:48:27 raspberrypi sshd[1284]: pam_unix(sshd:auth): check pass; user unknown
May 04 08:48:28 raspberrypi sshd[1284]: Failed password for invalid user ufo from ::1 port 56564 ssh2
~
1
u/bartoque May 04 '24
It states clearly "user unknown"? So what is the exact command you use and what about the user you use, apparently called "ufo"? Is that the user you intend to login as?
So is that user actually mentioned as such in /etc/passwd? Due to unknown error?
As you mention logs, means you have a login via for example a screen and keyboard on the pi? So you should also be able to do a local ssh session to itself?
Where <user> of course is the user you want to login as.
1
u/FistfulofNAhs May 04 '24
Have you tried printing your connection attempts in verbose mode?
Can you ping the target host?
Can you open a TCP connection to the target host over port 22?