SSH key Non-Root User

Backup and data protection discussion at its finest.

Moderator: Lillian.W@AST

Post Reply
voxhel
Posts: 13
youtube meble na wymiar Warszawa
Joined: Wed Apr 22, 2020 7:59 pm

SSH key Non-Root User

Post by voxhel »

Hi,

I need to make daily backup using ssh with a non-root user account, but using a certificate key, instead of using a password. Using Sftp to 2222/tcp.

How can make this work, because it does not allow me to.

Reagrds.

V.
Asustor AS6210T
AS6210T
voxhel
Posts: 13
Joined: Wed Apr 22, 2020 7:59 pm

Re: SSH key Non-Root User

Post by voxhel »

Hi,

From a Linux, using a non-root user account on Asustor, connected to sFtp 222/tcp i want to use BackInTime to make the backps.

But, it does not let me use a key.

How can i do this?

for reference:
https://www.techrepublic.com/article/ho ... -over-ssh/

https://backintime.readthedocs.io/en/la ... tings.html
AS6210T
ndl101
Posts: 57
Joined: Sun Jul 11, 2021 4:32 pm

Re: SSH key Non-Root User

Post by ndl101 »

It is impossible to help you without additional information about your setup, what you have tried, configurations, error logs (if any) etc.
https://www.linux.com/topic/networking/ ... ion-fails/

I made it long as I lacked the time to make it short.

---
Help to self-help:
How to ask (good) questions in a forum
---
General information
Location: Denmark
OS: Ubuntu 20.04
NAS: Lockerstor 4 (AS6604T)
User avatar
father.mande
Posts: 1808
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: SSH key Non-Root User

Post by father.mande »

Hi,

Before enter in detail, just be sure that your user is member of the administrators group require to use ssh or sftp
after if all manually works as expected, you can manage to add keys using ssh tools.

Take attention to know hosts and perhaps not strict host key check.

Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
chel
Posts: 2
Joined: Fri May 07, 2021 11:01 pm

Re: SSH key Non-Root User

Post by chel »

I am also trying to establish ssh connection using key and not password.
I added the public key to the authorized_keys file in the ~/.ssh/authorized_keys.
Also I checked in the /usr/etc/ssh/sshd_config that following lines are uncommented:

PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys

But still when I try to login via ssh NAS asked me to enter password.
ndl101
Posts: 57
Joined: Sun Jul 11, 2021 4:32 pm

Re: SSH key Non-Root User

Post by ndl101 »

chel wrote:I am also trying to establish ssh connection using key and not password.
I added the public key to the authorized_keys file in the ~/.ssh/authorized_keys.
Also I checked in the /usr/etc/ssh/sshd_config that following lines are uncommented:

PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys

But still when I try to login via ssh NAS asked me to enter password.
Did you check that the permissions are correct as well? Are you using the correct username?

I made it long as I lacked the time to make it short.

---
Help to self-help:
How to ask (good) questions in a forum
---
General information
Location: Denmark
OS: Ubuntu 20.04
NAS: Lockerstor 4 (AS6604T)
Post Reply

Return to “Backup and Data Protection”