Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop default values (fixes #102) #117

Merged
merged 8 commits into from
Oct 23, 2017
Merged

drop default values (fixes #102) #117

merged 8 commits into from
Oct 23, 2017

Conversation

alxwr
Copy link
Member

@alxwr alxwr commented Oct 12, 2017

fixes #102

tested on:

  • FreeBSD 10.3
  • Debian 8.9
  • Ubuntu 14.04

@alxwr alxwr mentioned this pull request Oct 12, 2017
@aboe76
Copy link
Member

aboe76 commented Oct 12, 2017

@alxwr I want to test this first before I merge.

@aboe76
Copy link
Member

aboe76 commented Oct 12, 2017

@alxwr looks good except that it leaves a lot of empty lines and comments between the options...
which makes a weird sshd_config file.

@alxwr
Copy link
Member Author

alxwr commented Oct 13, 2017

@aboe76 I'll try to optimize that. :-)

@alxwr
Copy link
Member Author

alxwr commented Oct 13, 2017

@aboe76 I removed the redundant white space.

@aboe76
Copy link
Member

aboe76 commented Oct 14, 2017

@alxwr somewhere around AllowUsers, and allowgroups it merges all the lines together.

AllowUsers xxxx xxxxAllowGroups xxxxKexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctrMACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-sha1,umac-128@openssh.comCompression no

It should be:

AllowUsers XXXX XXXXX
AllowGroups XXXXX
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-sha1,umac-128@openssh.com
Compression no

@alxwr
Copy link
Member Author

alxwr commented Oct 14, 2017

@aboe76 whitespace issues should be fixed. :-)
Please test again!

@aboe76
Copy link
Member

aboe76 commented Oct 15, 2017

@alxwr thanks looks good.

Copy link
Member

@aboe76 aboe76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, and clean sshd_config file.

@aboe76 aboe76 requested a review from whiteinge October 15, 2017 17:32
@aboe76
Copy link
Member

aboe76 commented Oct 15, 2017

@whiteinge can you give some feedback?

@aboe76
Copy link
Member

aboe76 commented Oct 16, 2017

@alxwr still see some trouble with ciphers being on the same line as kexalgorithms.

I pinpointed the problem with the lists:
This will give an error:

sshd_config:
  KexAlgorithms:
    - 'curve25519-sha256@libssh.org'
    - 'diffie-hellman-group-exchange-sha256'
    - 'diffie-hellman-group-exchange-sha1'
    - 'diffie-hellman-group14-sha1'
  Ciphers:
    - 'chacha20-poly1305@openssh.com'
    - 'aes256-gcm@openssh.com'
    - 'aes128-gcm@openssh.com'
    - 'aes256-ctr'
    - 'aes192-ctr'
    - 'aes128-ctr'
  MACs:
    - 'hmac-sha2-512-etm@openssh.com'
    - 'hmac-sha2-256-etm@openssh.com'
    - 'hmac-ripemd160-etm@openssh.com'
    - 'umac-128-etm@openssh.com'
    - 'hmac-sha2-512'
    - 'hmac-sha2-256'
    - 'hmac-sha1'
    - 'hmac-ripemd160'
    - 'umac-128@openssh.com'

while this will work:

sshd_config:
  KexAlgorithms: 'curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1'
  Ciphers: 'chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr'
  MACs: 'hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-sha1,hmac-ripemd160,umac-128@openssh.com'

Copy link
Contributor

@whiteinge whiteinge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I don't have anything to add to @aboe76 's good feedback.

@alxwr
Copy link
Member Author

alxwr commented Oct 23, 2017

@aboe76 Reproduced and fixed the bug. :-) Thanks for testing!

Maybe squash the fix-of-the-fix commits before merging to increase clarity?

@aboe76 aboe76 merged commit 5e3368a into master Oct 23, 2017
@aboe76
Copy link
Member

aboe76 commented Oct 23, 2017

@alxwr thanks for this.

@alxwr alxwr deleted the no-defaults-102 branch October 28, 2017 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecated sshd options
3 participants