Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

How do cryptography in SSH(2) work (secure channel establishment, authentication)?

Does key authentication in SSH(2) protect from MitM by providing authentication and integrity and why?

share|improve this question
add comment

2 Answers 2

How do cryptography in SSH(2) work?

This is a very broad question. If you're interested in the details, then read the relevant RFCs that describe the SSH protocol. In particular:

Does key authentication in SSH(2) protect from MitM by providing authentication and integrity and why?

Assuming you're referring to Public Key Authentication (where a client authenticates by proving they hold the private key of a pre-shared public key), then not directly/entirely. Public key authentication is a feature of the SSH Authentication Protocol, which runs on top of the SSH Transport Protocol, and generally assumes that the transport protocol provides confidentiality and integrity.

The Public Key Authentication does provide some protection against mitm attacks (by associating the proof of the private key with the SSH session ID), which will prevent the mitm passing on the private key proof as an authentication credential, but won't prevent an attacker using other credentials to access the target system.

The primary mechanism for man-in-the-middle prevention in the SSH Transport Protocol is the verification of pre-shared (or otherwise verifiable via some trusted channel) host keys.

RFC 4251 - The Secure Shell (SSH) Protocol Architecture discusses potential Man-in-the-middle attacks on the SSH protocol and the approaches taken to prevent them.

share|improve this answer
    
Let's speak only about public key cryptography, as it's the one attacked by MitM. –  Smit Johnth Apr 20 '13 at 16:26
add comment

I am sorry that I can not comment your post, and have to write this as answer...

But maybe you want to move this question to security.stackexchange.com.

And the security goal of key authentication is that both enities can be sure that the public key of the other person actually does belong to the other person. This should prevents a potential attacker from passing false keys to both parites in order to decipher their communication.

If by authentication and integrity you mean key authentication and key integrity, and by that you meant what i will just assume you meant, I would say yes, it protects from "this kind of" mitm attacks. But remember that there are still other methods to perform mitm attacks.

share|improve this answer
    
But maybe you want to move this question to security.stackexchange.com. - Why? crypto.stackexchange.com/questions/3706/… –  Smit Johnth Apr 16 '13 at 9:57
3  
Because there is a difference between cryptography and it security, just as there is between the question you linked, and the question you posted. If there wasn't, your linked question should also answer your posted question. If you are interested in the cryptographic aspects of SSH and performing MitM attacks, you should rephrase your question a bit ;) –  user1451340 Apr 16 '13 at 11:04
    
Does someone else share the opinios of user1451340? –  Smit Johnth Apr 17 '13 at 8:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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