ssh login --
Jeffrey Walton
noloader at gmail.com
Sun Jul 14 19:18:08 UTC 2024
On Sun, Jul 14, 2024 at 2:58 PM bruce <badouglas at gmail.com> wrote:
>
> Did a clone of a working ubuntu instance on digitalocean.
>
> Trying to login now, as "root at 1.2.3.4 from the local test system where I'm root.
>
> The login goes through without asking for passwd!! -- not what the
> initial test instance was set to..
>
> Did a check of the "/etc/ssh/sshd_config" on both systems. As far as i
> can see, no diff.
>
> On the local machine, I changed to a diff user, and then ssh @1.2.3.4
> and i get
> Permission denied (publickey).
>
> Looked over different net/sites, can't see what I'm missing.
>
> Any thoughts?
You did not show your sshd config, so we can only speculate on what is
not correct about your config.
Here's how I set up sshd to require public key authentication,
disallow passwords, and disallow root logins.
$ cat /etc/ssh/sshd_config.d/10-pubkey_auth.conf
# Disable passwords
PasswordAuthentication no
ChallengeResponseAuthentication no
KerberosAuthentication no
KerberosOrLocalPasswd no
GSSAPIAuthentication no
UsePAM no
# Enable public key
PubkeyAuthentication yes
$ cat /etc/ssh/sshd_config.d/20-no_root_login.conf
PermitRootLogin no
Jeff
More information about the ubuntu-users
mailing list