SSH Communications Security
Previous Next Up [Contents] [Index]

    About This Document>>
    Introduction to SSH Secure Shell >>
    Configuring SSH Secure Shell >>
    Authentication >>
    Log Messages >>
    Using SSH Secure Shell >>
        Using the Secure Shell Server Daemon (sshd2)>>
            Manually Starting the Secure Shell Server Daemon
            Automatically Starting the Server Daemon at Boot Time
            Operation of the Server Daemon
            Resetting and Stopping the Server Daemon
            Daemon Configuration File and Command-Line Options
            Subsystems
        Using the Secure Shell Client (ssh2)>>
        Using Secure Copy (scp2)
        Using Secure File Transfer (sftp2)
        Using Authentication Agent (ssh-agent2, ssh-add2)
    Tool Syntax>>
    Technical Specifications >>

Operation of the Server Daemon

When sshd2 is started, it begins to listen on a port for a socket. The default port is port 22, now a well-known port for Secure Shell. This can be changed to suit any custom environments, e.g. if you want to run sshd2 from a non-privileged account; however, make sure that no other process is using the port you are planning to use.

The Secure Shell daemon can also be started from the Internet daemon inetd. For the purpose of this text, it is assumed that sshd2 is not invoked through inetd but started on its own.

When the daemon is listening for a socket, it waits until a client initiates a socket connection. Once connected, the daemon forks a child process, which in turn initiates key exchange with the client. The child process handles the actual connection with the client, including authentication, supported cipher negotiation, encrypted data transfer, and termination of the connection. After the connection has been terminated, the child process terminates as well. The parent process continues listening for other connections until explicitly stopped.

Login Process

When a user successfully logs in, sshd2 performs the following operations:

  1. Changes to run with normal user privileges.
  2. Sets up a basic environment.
  3. Reads /etc/environment if it exists.
  4. Changes to the user's home directory.
  5. Runs the user's shell or specified command.

Previous Next Up [Contents] [Index]


[ Contact Information | Support | Feedback | SSH Home Page | SSH Products ]

Copyright © 2003 SSH Communications Security Corp.
All rights reserved.
Copyright Notice