TS-228 : how to connect with an account other than root in ssh

Tell us your most wanted features from QNAP products.
Post Reply
Snapower
New here
Posts: 4
Joined: Thu Mar 01, 2018 6:23 am

TS-228 : how to connect with an account other than root in ssh

Post by Snapower »

Hi,

How to connect with an account other than root in ssh with TS-228 ?
The file /etc/ssh/sshd_config is overwritten at the factory configuration with each reboot.
I found copies of this file but nothing helps :
/mnt/HDA_ROOT/.config/ssh/sshd_config
/mnt/emmcp5/usr/local/etc/ssh/sshd_config

I only wish I could edit this line:

Code: Select all

AllowUsers admin myuserlogin
NAS: TS-228 | F/W: 4.3.4.0675 | CPU : ARMv7 | OS : 3.10.20-al-2.5.3
Apps : Entware, openssh-server
fbernard
New here
Posts: 6
Joined: Wed Apr 26, 2017 9:15 pm

Re: TS-228 : how to connect with an account other than root in ssh

Post by fbernard »

I activated my personal user account for SSH access through the GUI, by using Control Panel/Network & File Services/Telnet/SSH, anc clicking the button named "Edit Access Permission".
This gives you a list of users, and each has a checkbox for remote SSH access.
It works, even though the page clearlysays "only the account admin can login remotely".
It also survives reboots.
I'm using QTS 4.3.4.0486 on TVS-1282.
You do not have the required permissions to view the files attached to this post.
User avatar
Don
Guru
Posts: 12289
Joined: Thu Jan 03, 2008 4:56 am
Location: Long Island, New York

Re: TS-228 : how to connect with an account other than root in ssh

Post by Don »

The 'Edit Access Permission' page only gives you a list of administrators, not all users.

To allow other than administrators access you need to install your own version of ssh server. If you really want to do this then search the forum as it has been done before.
Use the forum search feature before posting.

Use RAID and external backups. RAID will protect you from disk failure, keep your system running, and data accessible while the disk is replaced, and the RAID rebuilt. Backups will allow you to recover data that is lost or corrupted, or from system failure. One does not replace the other.

NAS: TVS-882BR | F/W: 5.0.1.2346 | 40GB | 2 x 1TB M.2 SATA RAID 1 (System/VMs) | 3 x 1TB M.2 NMVe QM2-4P-384A RAID 5 (cache) | 5 x 14TB Exos HDD RAID 6 (Data) | 1 x Blu-ray
NAS: TVS-h674 | F/W: 5.0.1.2376 | 16GB | 3 x 18TB RAID 5
Apps: DNSMasq, PLEX, iDrive, QVPN, QLMS, MP3fs, HBS3, Entware, DLstation, VS, +
Snapower
New here
Posts: 4
Joined: Thu Mar 01, 2018 6:23 am

Re: TS-228 : how to connect with an account other than root in ssh

Post by Snapower »

In order to use users who are not administrators, I installed the application "Entware-3x-std 1.00" and then I installed openssh-server with OPKG.

Code: Select all

# /opt/bin/opkg list-installed
 ...
entware-opt - 1.0-4
openssh-keygen - 7.6p1-1
openssh-server - 7.6p1-1
opkg - 2011-04-08-9c97d5ec-17a
...
After that, I'm not sure if I'm using OpenSSH because I still can not connect :

Code: Select all

$ ssh -p 22 myUser@myNas
myUser@myNas's password: 
Permission denied, please try again.
NAS: TS-228 | F/W: 4.3.4.0675 | CPU : ARMv7 | OS : 3.10.20-al-2.5.3
Apps : Entware, openssh-server
chrisonnas
Getting the hang of things
Posts: 50
Joined: Sat Jan 05, 2019 5:27 pm

Re: TS-228 : how to connect with an account other than root in ssh

Post by chrisonnas »

fbernard wrote: Sun Mar 18, 2018 11:41 pm I activated my personal user account for SSH access through the GUI, by using Control Panel/Network & File Services/Telnet/SSH, anc clicking the button named "Edit Access Permission".
This gives you a list of users, and each has a checkbox for remote SSH access.
It works, even though the page clearlysays "only the account admin can login remotely".
It also survives reboots.
I'm using QTS 4.3.4.0486 on TVS-1282.
Thank you! I can confirm that this worked. I havent tested a reboot yet, but so far so good.

I created a new user, put them in the "administrators" group and also disabled their file access to only a single share. My plan is to use this accounr for rsync over SSH to backup my linux machine. I really didnt want it connecting to the NAS as root with access to all the storage locations.

Note that the user isnt shown as "administrator" in the user list, only admin is.
Post Reply

Return to “Features Wanted”