My main work machines are Macs these days, but I still have a Linux VPS running for tinkering purposes. For convenience, I use Termius
There are 2 accounts on my Linux VPS: root and anta40. To login, I use SSH keys instead of password. Login as root works fine. There is trouble login as anta40, though. Here's the log, which says " Authentication that can continue: publickey" :
Starting a new connection to: "XXX.XXXX.XXX.XXX" port "22"
⚙️ Starting address resolution of "XXX.XXXX.XXX.XXX"
⚙️ Address resolution finished
⚙️ Connecting to "XXX.XXXX.XXX.XXX" port "22"
? Connection to "XXX.XXXX.XXX.XXX" established
⚙️ Starting SSH session
⚙️ Remote server: SSH-2.0-OpenSSH_9.0p1 Debian-1+b1
⚙️ Agreed KEX algorithm: ecdh-sha2-nistp256
⚙️ Agreed Host Key algorithm: ecdsa-sha2-nistp256
⚙️ Agreed server-to-client cipher: aes128-ctr MAC: hmac-sha2-256
⚙️ Agreed client-to-server cipher: aes128-ctr MAC: hmac-sha2-256
⚙️ Agreed client-to-server compression: none
⚙️ Agreed server-to-client compression: none
⚙️ Handshake finished
? Checking host key: XX:XXX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
? Host "XXX.XXXX.XXX.XXX":"22" is known and matches
? Authenticating to "XXX.XXXX.XXX.XXX":"22" as "anta40"
⚙️ Available client authentication methods: publickey,password,keyboard-interactive
⚙️ Authentication that can continue: publickey
? Authenticating using publickey method
❗ Authentication failed (publickey)
⚙️ Partial success: no
⚙️ Authentication that can continue: publickey
? No more authentication methods to try
Here's what I already did so far (as root):
- Create a
/home/anta40/.ssh/authorized_keys
which contains anta40's public key chmod 700 /home/anta40/.ssh
chmod 600 /home/anta40/.ssh/authorized_keys
chown -R anta40:anta40 /home/anta40/.ssh
What's wrong here?