Creating SSH User and restrict to a single user share


Recommended Posts

I am currently using OpenSSH and tried a few things to get this work - hosed my root SSH access for a bit in the process, so I figured I would check if anyone actually knows how to do this.

 

The end result is using WHMEasyBackup to SSH to one folder in order to send cpanel backups to my server.

 

Any ideas?

Link to comment

unRAID users are actually service users - not real users by default.

 

Try this, add this line to the /boot/config/ssh/sshd_config

AuthorizedKeysFile      /etc/ssh/%u.pubkeys

 

place the public key inside /boot/config/ssh/sshd_config/root.pubkeys

Easiest to just restart unRAID after this

 

Then you should be able to ssh in as root (without passwords using the matching private key)

However, this means all files will be created as root:root unless your backup mechanism allows you to specify the owner of the uploaded files

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.