SSH suddenly not working? reddit / selfhosted ---------------------------------------------------------------------- bridgebucket · 2023-10-20 00:55 I have two machines, one is Windows 11 and my server is running Debian 12. SSH has run fine on both machines up until recently. Whenever i try to SSH into my server, it will reject the password (which is undoubtedly correct), and after a few failed attempts it will give me an error that says "Permission denied (publickey,password)." I can SSH into the server completely fine on my other devices, so the problem has to lie within my Windows machine. Since I last used SSH, the only notable things that have happened were that I installed (and soon after uninstalled) the OpenSSH server for Windows, and yesterday an internet outage happened that left me without internet for a full day. This morning, the router was reset and I've ensured that both machines are connected. If this is the wrong sub to be posting this on, I'd appreciate if someone were to kindly point me to a correct sub on which I could repost. ---------------------------------------------------------------------- TrustyworthyAdult · 2023-10-20 01:11 Reboot your server ---------------------------------------------------------------------- bridgebucket · 2023-10-20 01:11 I've rebooted the server several times. And as stated in my post, the issue has to be coming from my Windows machine. ---------------------------------------------------------------------- IVOreosFromHeaven · 2023-10-20 01:47 What software are you using to SSH from Windows? ---------------------------------------------------------------------- ddpbsd · 2023-10-20 01:57 `systemctl stop ssh&&/usr/sbin/sshd -ddd` on the server, then try again ---------------------------------------------------------------------- vuduguru · 2023-10-20 01:58 Haha. Not a windows machine. =) ---------------------------------------------------------------------- vuduguru · 2023-10-20 02:04 Is is possible that Windows passkey is being used? Did you remove all traces of the sshd install. Also if your using Windows Terminal try putty. Note the order of "(publickey,password)". I'm gonna guess publickey is being used before password. Certainly seems like a Windows (client) problem and not a server problem. ---------------------------------------------------------------------- bridgebucket · 2023-10-20 02:14 I'm using default terminal, but I've tried connecting from putty as well and it didn't work. ---------------------------------------------------------------------- IVOreosFromHeaven · 2023-10-20 02:16 You got Fail2Ban installed on your Linux host? Has it possibly banned your Windows IP? ---------------------------------------------------------------------- bridgebucket · 2023-10-20 02:19 How would I go about removing the sshd install traces? I just used the powershell command for uninstalling the server that was provided in this page (but this wouldn't be the first time Microsoft has screwed me over.): https://learn.microsoft.com/en-us/windows- server/administration/openssh/openssh_install_firstuse I've tried putty, it hasn't worked. ---------------------------------------------------------------------- bridgebucket · 2023-10-20 02:22 I've installed Fail2Ban before on this machine, but I've since uninstalled it. I've also checked sudo-iptables, and it doesn't show any rejected IPs. ---------------------------------------------------------------------- Senkyou · 2023-10-20 02:25 Check your logs /var/log/auth.log. You can pipe grep it to search by IP or just try to connect then quickly check. That might give you more insight that isn't being provided to the remote client (windows). ---------------------------------------------------------------------- bridgebucket · 2023-10-20 03:20 Doesn't seem like there are any logs. ---------------------------------------------------------------------- kindrudekid · 2023-10-20 03:32 Check storage if it’s full, if it cannot audit your login it won’t let you. ---------------------------------------------------------------------- bridgebucket · 2023-10-20 03:34 Using ipconfig on the Windows machine reveals that what is supposed to be my internal IP has turned into an external one... No clue how this happened, or why. I'm currently contacting ATT support, see if that fixes my SSH issue. Seems like the Windows machine is the only machine to have this issue. ---------------------------------------------------------------------- vuduguru · 2023-10-20 03:58 Was going to sat delete any folders likely containing keys. But looks like you got it sorted. Well done. ---------------------------------------------------------------------- springs87 · 2023-10-20 04:06 When you say your Windows machine is getting an external ip, is it an actual external ip or that it's the 169 address that your machine gets when it can't speak to your dhcp server? Can you access the Internet or any other services on your Windows machine? ---------------------------------------------------------------------- Senkyou · 2023-10-20 04:40 There should definitely be something there unless you're redirecting logs. You need to elevate with sudo, if that was in doubt. I would double check honestly. I'm not sure off of the top of my head, but you might get some mileage by running 'journalctl -u sshd.service'. Be warned, you'll want to trim down the amount of output you get on that or you'll end up with quite a bit. ---------------------------------------------------------------------- Senkyou · 2023-10-20 04:42 Fwiw he wouldn't get a public key password denied type error if he wasn't able to at least reach the target, to my knowledge. ---------------------------------------------------------------------- Senkyou · 2023-10-20 04:44 That implies something router related, which it sounds like you're on top of with your ATT call. If you check the settings, is anything enabled that might be called transparent or bridge mode? ---------------------------------------------------------------------- bridgebucket · 2023-10-20 05:07 Some shit called 'IP passthrough' was enabled. No clue what it does, but it got disabled and SSH works now. ---------------------------------------------------------------------- bridgebucket · 2023-10-20 05:09 It was my actual external IP. I could access the internet and everything just fine, but when I tried to connect to Jellyfin or anything that my other machine is running it wouldn't work. The issue is resolved now. ---------------------------------------------------------------------- helmut72 · 2023-10-20 05:43 Connect with more v(erbose) output to your server. Example: ``` ssh -vvvv @ ``` ... and read line by line. ---------------------------------------------------------------------- Senkyou · 2023-10-20 11:24 Ah yeah. Sam's type of deal. That would have been it. Were I you I'd be checking over my windows box pretty close now.