I am designing a protocol that will have security in mind as one of its key goals. Currently I have selected SSH with TLS as the underlying transport.

I selected SSH because it had a variety of extensible authentication methods built-in already, which would not only make it easier to add my own in the future but (in some cases) make it unnecessary to add any at all, depending on how the user wants to authenticate themselves. It also has file transfers built-in, which is a nice bonus for me too.

With that in mind, should I continue using SSH over TLS, or is that overkill? Or should I switch to using normal non-SSH-based sockets?

Side note: this protocol will not be used to access remote systems via a command terminal.

  • $\begingroup$ It seems you're mainly interested in user authentication and management features. In that case SSH seems to be a better fit for your needs than TLS, which focuses on providing a secure socket and server authentication. All this has little to do with cryptography (and this question is probably better suited to IT security for that reason), but I guess those reasons are much better than any cryptographic reason that will be given here; both protocols have their pitfalls, but both can be made secure. $\endgroup$
    – Maarten Bodewes
    Commented Oct 18, 2019 at 13:50

1 Answer 1

  1. SSH over TLS isn't just an overkill, it's a software bloat / design creep.

Both protocols provides confidentiality, integrity, and authenticity guarantees, so using two is redundent. And coding for both of them would increase the size of the software, making it harder to maintain software quality, efficiency, and security.

  1. Benefit of SSH

SSH is already a very good application data encapsulation protocol, and in fact, the most widely used SSH implementation "OpenSSH" allows you to setup your own service running side-by-side with sftp. In my opinion, SSH is easier to setup and have many desireable features for specialized application.

On the other hand TLS carries too much legacy, it has too many options that needs to be supported to maintain compatibility with existing implementations. Even if you implement no support for versions before TLS-1.3, incorporating support for it in code still require considerable amount of expertized skills.

  • $\begingroup$ Could you elaborate on both of your points a bit? Currently trying to find out information on your second point, but your first point is kinda vague. $\endgroup$
    – Ethin
    Commented Oct 18, 2019 at 1:25
  • $\begingroup$ Update: nevermind on point 2 (I suffered a blank). Point 1 though (I think) still needs some elaboration. $\endgroup$
    – Ethin
    Commented Oct 18, 2019 at 1:32
  • $\begingroup$ Thanks for the elaboration -- I understand now! $\endgroup$
    – Ethin
    Commented Oct 18, 2019 at 3:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.