Author Topic: SSH access for a non-root user  (Read 535 times)

0 Members and 1 Guest are viewing this topic.

SSH access for a non-root user
« on: June 28, 2018, 10:25:31 PM »
I can't seem to find any information regarding my question.

I can connect to my server at root using SSH using key-based authentication.

But I am am also trying to setup SSH access for a non-root user on the server.

Shell access is checked ✓ under Edit User.

Ideally I would like to use a unique SSH key for this user, but I have no idea how to set that up.

In the meanwhile, I am trying to connect as that user. But I receive

Code: [Select]
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
If I try and connect using the root's key I receive

Code: [Select]
Server refused our key
What am I missing?

Re: SSH access for a non-root user
« Reply #1 on: June 28, 2018, 10:37:33 PM »
Nevermind. Figured it out. I'll share the solution for some other noob who is sure to ask the same question.

I just needed to create a keypair using ssh-keygen -f <username> which put username and in my user's /home/.ssh directory.

I then had to create a file called authorized_keys in the same directory and copy the contents of into it.

I then use the username file as the private key when connecting as from PuTTy/BitVise/MobaXterm/etc.
« Last Edit: June 28, 2018, 10:57:06 PM by stevland »