Project

General

Profile

Bug #5989

Editing sshd_config via Extra Options in the GUI creates duplicate entries

Added by Anthony Chianese about 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
Suraj Ravichandran
Category:
Middleware
Target version:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

If you want to change an option in sshd_config that is not listed in the GUI under Services - SSH, you should be able to add it under Extra Options. If the line already exists in sshd_config, the line typed into the GUI should replace the original line or take precedence over it.

In version 9.2.0, if I add the line "ClientAliveCountMax 100" to Extra Options then click Ok, this line is appended to sshd_config, but the original entry, "ClientAliveCountMax 3", is still there and I think it takes precedence.

My sshd_config before adding any extra options:


Protocol 2
UseDNS no
Subsystem sftp /usr/libexec/sftp-server -l ERROR -f AUTH
ChallengeResponseAuthentication no
ClientAliveCountMax 3
ClientAliveInterval 15
Port 22
PermitRootLogin yes
AllowTcpForwarding no
Compression no
PasswordAuthentication yes
PubkeyAuthentication yes

and after adding "ClientAliveCountMax 100" to Extra Options


Protocol 2
UseDNS no
Subsystem sftp /usr/libexec/sftp-server -l ERROR -f AUTH
ChallengeResponseAuthentication no
ClientAliveCountMax 3
ClientAliveInterval 15
Port 22
PermitRootLogin yes
AllowTcpForwarding no
Compression no
PasswordAuthentication yes
PubkeyAuthentication yes
ClientAliveCountMax 100

I'm not sure if this behavior occurs in other GUI edits of config files, or if it still occurs in newer versions of FreeNAS.

Associated revisions

Revision 01bd19f5 (diff)
Added by Suraj Ravichandran about 6 years ago

Make the SSH service GUI form's Extra Options take precedence over default sshd_config parameters prespecified in the ix-sshd script. However if the GUI options entries are not specified then the default values are still taken and written into sshd_config Ticket: #5989

History

#1 Updated by Suraj Ravichandran about 6 years ago

  • Status changed from Unscreened to Screened
  • Assignee set to Suraj Ravichandran

This bug is also present in the most recent FreeNAS version, and you are correct it does get duplicated.
For now, I can only confirm this for this particular SSH GUI edit.

#2 Updated by Suraj Ravichandran about 6 years ago

Have a working Patch....Reviewing it to make sure nothing is broken.

I did test it out and ssh turns on alright, but will see if the actual
features work properly after being specified from the extra gui options tab.

#3 Updated by Suraj Ravichandran about 6 years ago

  • Target version set to 9.3-M3

Fixed with the above mentioned patch.

Better solution coming soon.
01bd19f583b5a1f2f0dfa672d1d3766a9c82602d

#4 Updated by Suraj Ravichandran about 6 years ago

  • Status changed from Fix In Progress to Resolved

Also available in: Atom PDF