0

When on the server i can login to localhost using:

ssh localhost    
username@localhost's password:  
Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.11.0-40-generic x86_64)

However when I try and login remotely i get this:

ssh 1.2.3.4 -l username
[email protected]'s password:
Permission denied, please try again.

The password is absolutely correct.

Edit: I added the verbosity to the client login and this is the output after entering the password

debug3: send packet: type 50
debug2: we sent a password packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
CathalMF
  • 101
  • 1
  • 2
    (a) is "username" actually "root"? (b) are you using the correct IP address? – roaima May 04 '22 at 15:04
  • Did you check the logs of `sshd`? – Bodo May 04 '22 at 15:10
  • 1
    Use [this answer](https://unix.stackexchange.com/a/268692/108618) to fetch public host keys from the server in the two cases. If the responses don't match (note: the order of lines doesn't matter) then it's not the same server (*maybe* remotely you're connecting to the ISP's server?). – Kamil Maciorowski May 04 '22 at 15:16
  • Use `ssh -v ...` to get more information. – waltinator May 04 '22 at 15:27
  • @roaima No its not root – CathalMF May 04 '22 at 15:43
  • @waltinator I updated the question with the output from -vvv after entering the password. Doesnt help much. – CathalMF May 04 '22 at 15:49
  • @KamilMaciorowski It is the correct server. – CathalMF May 04 '22 at 15:50
  • 1
    You haven't mentioned the server OS or Distribution. If it has `/var/log/auth.log` or `/var/log/secure` please add the lines tagged with ssh to your question. If it doesn't have this file please check other recently modified files in `/var/log` for entries tagged with ssh – roaima May 04 '22 at 16:18
  • 1
    FYI- you might want to obfuscate your IP address since it's public. – clownbaby May 06 '22 at 16:29
  • Any information from the server logs? Those will explain the reason, whereas client logs will only show a simple refusal – roaima May 06 '22 at 17:18
  • Have you edited `/etc/ssh/sshd_config` at all? – roaima May 06 '22 at 17:19

0 Answers0