Session
A session is a temporary connection between two computers or systems wherein they exchange information. Learn how sessions are created and ended, how session state is tracked, and why protecting sessions matters for security.
What is a session?
A session is a period of interaction between two parties, such as a user and an application, or two systems, with a defined start and end. During a session, both sides keep track of shared context, such as who the user is, what they have done, and what settings apply. Examples include a signed-in web session, a remote desktop session, an SSH session, and a TCP connection.
How does a session work?
- Establishment: the parties connect and usually authenticate. The server creates a session and gives the client a session identifier, such as a cookie or token, or the two sides agree on session keys.
- Use: each request carries the session identifier, so the server knows it belongs to an authenticated user without asking for the password again.
- Termination: the session ends when the user signs out, the connection closes, or a timeout expires.
Sessions often have an idle timeout and a maximum lifetime, after which the user must authenticate again.
Signing out explicitly, rather than just closing a window, ends the session on the server side and invalidates its identifier.
Session vs. connection
A connection is the network link between two systems. A session is the logical interaction on top of it. A web session, for example, can continue across many separate network connections, and a single connection can carry several sessions.
Why does a session matter?
A session identifier is effectively a temporary credential. If an attacker steals it, through malware, an insecure connection, or a web flaw, they can act as the user. Short lifetimes, secure cookies, encryption, and re-authentication for sensitive actions protect sessions. For privileged work, recording what happens during a session also gives a clear audit trail.
Frequently asked questions
What is a session?
A session is a temporary connection between two computers or systems wherein they exchange information, with a defined start and end.
What is session hijacking?
Session hijacking is taking over an active session, often by stealing its session identifier, so the attacker can act as the authenticated user.
Why do sessions time out?
Timeouts limit how long an unattended or stolen session can be used, which reduces the window for misuse.
Keep privileged sessions visible
Watch privileged sessions live or review recordings later, with Devolutions Server.
Related terms
Session key
A session key is a temporary cryptographic key for accessing and protecting a session.
Read now →Cookie
A cookie is a small piece of data that a web server may leave on a user's web browser and retrieve during a future browsing session to identify the user.
Read now →