F2-221 - SSH trouble

IPv4/6, Port, VPN, proxy, SSH, remote access and more.
Locked
User avatar
franceskiello
Posts: 4
Joined: 17 Jan 2022, 17:16

F2-221 - SSH trouble

Post by franceskiello »

Hello,
I'm testing a new F2-221 device and I'm running in trouble with SSH access.
After adding and removing some test users I noticed that I was not able to login via SSH with super_user credential defined in the setup (in my case administrator) with "access is denied" message.
So I enabed telnet from the web interface and I logged on successfully this way.
I checked the /etc/ssh/sshd_config file and I found that the administrator username was messed up:

Code: Select all

AllowUsers administratoristrator
I made a correction with vi but after a reboot or any other action the name of the allowed ssh user became corrupted again.
I tried also renaming administrator to TOSadmin and that's what I got in the sshd_config

Code: Select all

AllowUsers TOSTOSadmin
I tried also to reinstall TOS but again after some test the same issue happen again.
Can you please help me solve this trouble?

TOS version is 4.2.18-2110301149

Best regards,
Francesco
User avatar
TMSupport
TerraMaster Team
Posts: 2314
Joined: 13 Dec 2019, 15:15

Re: F2-221 - SSH trouble

Post by TMSupport »

Hi! You need to log in to the ssh terminal with the admin user set up during initialization.
To contact our team, please send email to following addresses, remember to replace (at) with @
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
franceskiello
Posts: 4
Joined: 17 Jan 2022, 17:16

Re: F2-221 - SSH trouble

Post by franceskiello »

Yes I did, and the first time it works.
But then after having added some users and some other stuffs, I can't login anymore and the sshd_config file became corrupted.
User avatar
j.rocha
Posts: 1
Joined: 17 Jan 2022, 20:16

Re: F2-221 - SSH trouble

Post by j.rocha »

I had the same issue. I just changed admin username avoiding to use "admin" or "administrator" words and SSH login works again
User avatar
TMAY
Posts: 70
Joined: 17 Aug 2021, 10:00

Re: F2-221 - SSH trouble

Post by TMAY »

What is the format of the added user? What else did you do besides that? Can you provide it to us so we can verify if this problem exists
User avatar
franceskiello
Posts: 4
Joined: 17 Jan 2022, 17:16

Re: F2-221 - SSH trouble

Post by franceskiello »

I disabled password complexity from User Advanced Option GUI
Image
I added some users from the User GUI
Image
Even disabling password complexity it won't let me insert an user with password shorter than 8 characters.
So because I have one test user with 7 characters pwd, I first create the user with 8 then using telnet/ssh I did

Code: Select all

sudo -i
passwd username
smbpasswd username 
to set the 7 characters password.
That's all i did.

Francesco
User avatar
franceskiello
Posts: 4
Joined: 17 Jan 2022, 17:16

Re: F2-221 - SSH trouble

Post by franceskiello »

j.rocha wrote: 17 Jan 2022, 20:21 I had the same issue. I just changed admin username avoiding to use "admin" or "administrator" words and SSH login works again
I tried to follow the @j.rocha suggestion and it works:
I renamed the "administrator" user to "superuser" and the sshd_config file was compiled correctly:
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys
AllowUsers superuser
#AuthorizedPrincipalsFile none
So there must be something wrong in the GUI scripts, @TMSupport and @TMAY can you please check?

Francesco
Locked