What are the tasks of ssh and sshd respectively?

I know that sshd is the SSH daemon and also acts as SSH server. I am more interested in the details. From the man page of ssh,

There are some high level explanations, like that it is a program for logging in on a remote machine and executing commands and so, but there are not much details about what being the work of the sshd and what is being done by ssh.

Any ideas?

BR Patrik

EDIT

I am aware that the there is a man page for sshd as well,

However, this did not give provide much more answers to my questions. There are things that is a bit more obscure at work here and which would be nice to know.

  • Eg. is the TCP connection set up in the sshd and in that case, how can ssh access it?
  • Is the session set up in sshd for both for both outgoing and incoming connections or does the ssh program deal with this for outgoing connections?
  • Does the sshd always handle the connections or does it delegate it to ssh? In that case how?
1

1 Answer

Your question is unclear.

SSHD is a server ( Analogous to a web server serving https) SSH is a client (Analogous to a browser).

In order to work, a compatible set of protocols and authentication mechanisms need to be negotiated. Generally the server defines what it will accept, and the client negotiates the best common protocol.

The SSH protocol itself is little.more then a well thought out, encrypted and authenticated tcp stream which typically allows tunnelling of other streams though it. Its common to use it to run interactive sessions like telnet, but it can equally be used to tunnrl/other protocols, or extended to allow scp file transfers. Generally the SSH client will defone the syntax, while both the client snd server need to work together to enable the functionality.

Typically the client (user) will authenticate itself to the server using the users credentials. The server wont typically authenticate to the client, but will provide its own (server) public key which can be fingerprinted, checked and remembered to frustrate MITM attacks.

6

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like