Page 1 of 1

F2-221 - SSH trouble

Posted: 17 Jan 2022, 17:42
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

Re: F2-221 - SSH trouble

Posted: 17 Jan 2022, 18:10
by TMSupport
Hi! You need to log in to the ssh terminal with the admin user set up during initialization.

Re: F2-221 - SSH trouble

Posted: 17 Jan 2022, 19:22
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.

Re: F2-221 - SSH trouble

Posted: 17 Jan 2022, 20:21
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

Re: F2-221 - SSH trouble

Posted: 17 Jan 2022, 21:41
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

Re: F2-221 - SSH trouble

Posted: 17 Jan 2022, 22:54
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

Re: F2-221 - SSH trouble

Posted: 18 Jan 2022, 02:50
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