filtertips
filtertips

Reputation: 903

log into server with created user on linux ubuntu

Server provider offered me an option to create ssh connection. I applied pub key generated with putty and I can enter it as a root.

First thing I did was to create a new user with sudo rights.

I opened /etc/ssh/sshd_config and inserted:

AllowUsers my_user

from /root/.ssh/authorized_keys I copy to /home/my_user/.ssh/authorized_keys

I apply

systemctl restart ssh

I try to enter again via putty.

login as: new_user

I get error: server refused our key ... What could be a problem?

Upvotes: 0

Views: 197

Answers (1)

Muhammad Taseen
Muhammad Taseen

Reputation: 579

could be a permission issue. set keys permission first

chown -R my_user:my_user /home/my_user/.ssh

chmod 700 /home/my_user/.ssh

chmod 600 /home/my_user/.ssh/authorized_keys

Upvotes: 1

Related Questions