On an Ubuntu 16.04 system on Google GCP, I need to create a new user
hello and allow other users to SSH to the system as user
hello using their current SSH keys.
Here's what I did to add my SSH public key to
sudo useradd -m hello -s /bin/bash sudo mkdir /home/hello/.ssh sudo chown hello:hello -R /home/hello sudo chmod 777 /home/hello/.ssh sudo cat ~/.ssh/authorized_keys >> /home/hello/.ssh/authorized_keys sudo chmod 700 /home/hello/.ssh/ sudo chmod 600 /home/hello/.ssh/authorized_keys
Problem: When I try to SSH to the server as
hello user, I get the error
Disconnected: No supported authentication methods available (server sent public key)
Nov 4 17:37:05 hello sshd: error: Received disconnect from 184.108.40.206 port 62346:14: No supported authentication methods available [preauth] Nov 4 17:37:05 hello sshd: Disconnected from 220.127.116.11 port 62346 [preauth]
What went wrong? Thank you!