Towards SSH3: How HTTP/3 improves secure shells | APNIC Blog (2024)

Towards SSH3: How HTTP/3 improves secure shells | APNIC Blog (1)

What would the SSH protocol look like if it was made today with recent network technologies? This is the question Olivier Bonaventure and I from UCLouvain asked ourselves when writing our latest research article.

The Secure Shell (SSH) protocol provides a secure way to access computers remotely over an untrusted network. SSH is currently the most popular way to access Unix-based hosts remotely. Built atop the unencrypted TCP protocol, SSH proposes its own mechanisms to establish a secure channel and perform user authentication.

In recent years, we saw significant advances in transport protocol design with new protocols such as QUIC proposing a fast and secure alternative to TCP. By the end of 2023, we revisited the SSH protocol in the light of recent protocols including QUIC (RFC 9000), TLS 1.3 (RFC 8446)and HTTP/3 (RFC 9114) almost 30 years after its initial design. The result is a protocol that provides an enhanced feature set without compromise compared to SSHv2.

In December 2023, we submitted our article to the SIGCOMM Computer Communication Review magazine, along with an implementation plan. A few days after the code release, we observed a significant amount of people posting about the project on social networks and news websites and it became the project with the fastest growth in our research lab, with the GitHub repository reaching more than 1,000 stars in less than 48 hours.

In this post, we explain the main ideas behind our work. This research paper presents a candidate for a new iteration of the SSH protocol, called SSH3. Whether this candidate will become the third version of SSH or a standalone protocol with a separate name will be decided in the future, probably after discussions at the Internet Engineering Task Force (IETF). However, in this blogpost, we refer to our work as SSH3.

Please note that we are researchers and have no affiliation other than our university. We are not related to OpenSSH either.

In a nutshell, SSH3 uses QUIC and TLS1.3 for secure channel establishment and the HTTP authorization (RFC 9114, RFC 9110) mechanisms for user authentication. Among others, SSH3 allows the following improvements:

  • Faster session establishment.
  • HTTP authentication methods such as OAuth 2.0 (RFC 6749) and OpenID Connect (OIDC) in addition to classical SSH user authentication.
  • Robustness to port scanning attacks — an SSH3 server can be made invisible to other Internet users.
  • UDP port forwarding in addition to classical TCP port forwarding.
  • All the features allowed by the modern QUIC protocol, including connection migration (soon) and multipath connections.

To understand how these improvements are possible, let’s have a look at the recently standardized HTTP/3 protocol and the modern mechanisms it provides.

HTTP/3

HTTP/3 provides the features of HTTP/2 on top of QUIC instead of the classical combination of TCP and TLS. QUIC provides seamless connection migration, and soon, multipath communication (draft-ietf-quic-multipath-06), enabling smooth network handovers that would have disrupted the connection with TCP.

The Extended CONNECT HTTP extension (RFC 9220) allows the application to directly use the underlying QUIC stream for sending arbitrary protocol data. The most appealing aspect of HTTP is its support for user authentication. A critical part of the SSH protocol resides in the session establishment and especially the user authentication process. HTTP already provides a solid set of mechanisms to perform user authentication that have been implemented and used for years for sensitive use cases such as banking and e-commerce.

Revisiting the SSH protocol architecture

Several initiatives have already considered running SSH over the QUIC protocol, but these propositions limit themselves to carrying classical SSH mechanisms inside QUIC streams (draft-bider-ssh-quic-09). In contrast with these propositions, SSH3 is built above HTTP/3, not directly over QUIC, and reconsiders the whole protocol architecture. This section enumerates the benefits of this architecture.

Reduced session establishment

Thanks to QUIC, that uses TLS 1.3 for its protocol handshake, SSH3 offers a significantly faster session establishment than SSHv2. Establishing a new session with SSHv2 can take five to seven network Round-Trip Times (RTT):

  1. The TCP handshake.
  2. Key exchange and cryptographic algorithm negotiation.
  3. Switching to the user-authentication protocol.
  4. Actual user authentication.
  5. Switching to the SSH connection protocol.

Relying on QUIC and HTTP/3, this time can be significantly reduced. Our prototype can establish a session with the following steps:

  1. The QUIC handshake, including key exchange (includes steps 1 and 2 of SSHv2 in a single round-trip).
  2. Waiting for the ENABLE_CONNECT_PROTOCOL HTTP settings frame.
  3. Sending an HTTP CONNECT method with the authorization header set (includes steps 3, 4, and 5 of SSHv2).

Step 2 may be ignored when communicating with a server known to support SSH over HTTP/3.

This provides a noticeably reduced session establishment as can be observed in Figure 3 comparing SSH3 and the classical OpenSSH over a network with a ping of 100 milliseconds.

In our article, we evaluated and compared session establishment times of the OpenSSH SSHv2 implementation and our SSH3 prototype. To do so, we ran single-command non-interactive SSH sessions and recorded the time taken for establishing the session, running the single command, and exiting. The three commands we run are shown on the x axis of Figure 4.

SSHv2 is the classical OpenSSH implementation, while SSHv2-nodelay is a version of OpenSSH that we modified to enforce the TCP_NODELAY Linux kernel option to further reduce the session establishment time of SSHv2. The three commands we run have different output sizes on average: 582 bytes for df, 35kB for sysctl and 131kB for ls. As Figure 4 shows, SSH3 drastically reduces the session completion time compared to SSHv2 and SSHv2-nodelay for every run command.

URL multiplexing

A benefit of HTTP/3 is that it provides multiplexing at the URL level that would not be possible using QUIC solely. SSH3 instances can be accessible through specific URLs. First, it can make SSH3 robust to scanning attacks. SSHv2 is subject to port scanning attacks like many TCP-based applications. Attackers can easily discover public SSH servers by scanning every TCP port and finding the ones answering to SSH session establishment. Once the attackers have discovered a public SSH endpoint, they can try dictionary attacks on passwords.

Based on HTTP/3, SSH3 servers can avoid being publicly discovered by only answering to SSH3 clients putting a specific value in their HTTP CONNECT request. Placing protected resources behind secret links like this is a common behaviour in web applications. It is however only complementary to the user authentication process. Our SSH3 prototype already allows placing the server behind a secret link.

Another benefit is that it allows HTTP/3 proxies to act as SSH3 gateways leading to different physical servers depending on the URL path specified in the CONNECT request. User authentication material is attached to the request using HTTP Authorization mechanisms. This allows locating numerous virtual machines or containers behind HTTP proxies and making them accessible through their specific URL, as depicted in Figure 7, with each user accessing a different physical host multiplexed on a URL path basis. Multiplexing can also be performed based on the HTTP hostname in addition to the URL.

Our SSH3 prototype currently allows multiplexing based on hostnames only, as reverse proxies need to be aware of the proxied protocol to correctly forward requests based on the URL path.

That being said, SSH3 users can already co-locate their SSH3 servers with their classical HTTP/3 servers on port 443 by relying on Server Name Indication (SNI) multiplexing. Multiplexing based on the SNI also allows defining virtual hosts without having to decrypt the QUIC traffic and therefore ensures a complete end-to-end communication between the SSH3 client and server with no proxy acting as a machine-in-the-middle.

X.509 certificates

The use of TLS certificates on web servers has been democratized thanks to the efforts of initiatives such as Let’s Encrypt. Server certificates can now be installed in a matter of seconds and provide a stronger security than classical SSHv2 host keys that require Trust on First Use (TOFU) and the user to manually check the server’s hostkey during the first connection establishment.

The HTTP protocol stack comes with a series of services and facilities to generate and manage X.509 certificates for this exact purpose of host authentication. Automatic Certificate Management Environment (ACME) is a great example of how easy it can be to generate certificates for new SSH3 hosts.

Upon first startup, the host can automatically generate a valid certificate for its domain name without manual action from the user. Host certificates for SSHv2 have been proposed and implemented in OpenSSH, but these are not X.509 certificates and can therefore not benefit from these services that are already serving millions of users. X.509 certificates can also be generated for IP addresses for hosts that do not have domain names (although there is no service providing ACME for IP-based certificates yet).

Finally, for private or personal use of SSH3, self-signed certificates can also be deployed at will, providing a security level comparable to traditional SSHv2 host keys.

HTTP-based authentication

SSH3 uses the generic HTTP authorization mechanism and puts user authentication material in the Authorization header of the CONNECT request. If the provided header suffices for authenticating and granting access to the user, the server responds with the 200 OK HTTP response. Our SSH3 prototype implements three authentication techniques.

  • Classical password-based authentication using the Basic HTTP scheme (RFC 7617).
  • Classical public key-based authentication using the Bearer HTTP scheme (RFC 6750), sends an HTTP JWT Bearer token (RFC 7519) signed by the user’s private key.
  • OIDC authentication, using the Bearer HTTP scheme.

Our SSH3 prototype natively supports OIDC, allowing users to connect through the identity provider of their company or using their own Google / Microsoft / Github/… account.

Other authentication schemes can be used in the future and newly standardized schemes can be added without much implementation effort, such as the Signature scheme recently proposed in the Signature HTTP Authentication Scheme Internet draft.

Where to go from here

The past weeks’ activity has been quite intense and we received feedback from numerous people of diverse backgrounds. This is a strong sign of the public interest in the project. Packages are also being built for diverse Linux distributions (currently under another name than SSH3 to avoid confusion with OpenSSH). Our plan in the coming months is to discuss the project at the IETF and see how it could get into the standardization process or be coordinated with other projects such as the MASQUE proxy.

How you can take part in the project

We are researchers with no private interest to defend and make no profit in developing and maintaining the project. We want the SSH3 project to grow and evolve thanks to the community, with the help and feedback from network engineers, researchers, developers, and system administrators. We encourage you to try out the project, send feedback, contribute to the codebase, provide experimental packages for your favourite distribution, and so on.

We are also looking for thorough security analysis and feedback from security experts. The project is still at an early stage. As with any new complex protocol, expert cryptographic review over an extended timeframe is required and we cannot yet endorse its appropriateness for production systems without further peer review. Please collaborate with us if you have relevant expertise!

I am easy to reach. For any questions, suggestions, or comments, do not hesitate to send me an email or directly contact me on X or LinkedIn. Also, let me know if you have already experienced SSH shortcomings not mentioned in this blog post that you would like to see addressed in this project!

Resources

Our SSH3 prototype is publicly available. The code is accessible on our GitHub repository where you can also find the most recent prebuilt releases and updates.‘Towards SSH3: how HTTP/3 improves secure shells’ preprint is available on arXiv.

François Michel is a PhD researcher at UCLouvain interested in networking protocols.

Rate this article

The views expressed by the authors of this blog are their own and do not necessarily reflect the views of APNIC. Please note a Code of Conduct applies to this blog.

Towards SSH3: How HTTP/3 improves secure shells | APNIC Blog (2024)

FAQs

What is HTTP 3 and why does it matter? ›

HTTP/3 is the latest major version of HTTP. Web browsers and servers can use it for significant upgrades to user experience, including performance, reliability, and security. Negotiating HTTP versions happens seamlessly, requiring no changes to website code.

What is SSH3? ›

SSH3 is a complete revisit of the SSH protocol, mapping its semantics on top of the HTTP mechanisms. It comes from our research work and we (researchers) recently proposed it as an Internet-Draft (draft-michel-remote-terminal-http3-00). In a nutshell, SSH3 uses QUIC+TLS1.

What are the advantages of HTTP 3 over HTTP 2? ›

HTTP/3 usage of QUIC over UDP addresses HTTP/2 limitations by eliminating head-of-line blocking, reducing latency, and enhancing overall web performance and security. It ensures a faster and more secure online experience for uninterrupted service regardless of changes in the user network environment.

What are the disadvantages of HTTP 3? ›

Using HTTP/3 over HTTP/2 can also have some drawbacks, especially for web applications that do not require low latency, high throughput, or high reliability. These drawbacks include increased complexity and overhead, lower compatibility and support, and higher variability and unpredictability.

What is the SSH protocol for Secure Shell? ›

The Secure Shell (SSH) protocol is a method for securely sending commands to a computer over an unsecured network. SSH uses cryptography to authenticate and encrypt connections between devices.

How to secure a SSH connection? ›

Enforcing Strong Authentication
  1. Require strong passwords. Require passwords that are at least twelve characters long, and combine uppercase and lowercase letters, numbers, and special characters.
  2. Enable two-factor authentication. ...
  3. Regularly update passwords. ...
  4. Implement account lockouts. ...
  5. Educate users. ...
  6. Use SSH keys.

What is the difference between SSH and HTTP server? ›

With SSH keys, you can authenticate and establish secure connections to repositories without using passwords. HTTP: Although HTTP(S) can be used for version control access, it may be less secure than SSH as it often requires password authentication, and the traffic is only encrypted when HTTPS is employed.

What is the difference between HTTP 1.1 and 3? ›

Quick Takeaways: HTTP/1.1: Old but reliable, slower performance. HTTP/2: Balanced in speed and compatibility. HTTP/3: Fastest and most secure but less supported.

Is HTTP 3 reliable? ›

Overall, HTTP/3 is particularly beneficial for developers building real-time chat and messaging applications, as it offers lower latency and improved reliability, making it ideal for use cases that require delivering real-time data fast.

What is HTTP and why is it important? ›

The Hypertext Transfer Protocol (HTTP) is the foundation of the World Wide Web, and is used to load webpages using hypertext links. HTTP is an application layer protocol designed to transfer information between networked devices and runs on top of other layers of the network protocol stack.

Does Google use HTTP 3? ›

It is a Chrome browser which use HTTP/3 with the Google side that this can't be a browser problem. Today in the year 2023 most browsers should support HTTP/3.

Top Articles
My Background Check Results | First Advantage
When to exercise through pain and when to stop - Puget Sound Orthopaedics
Blorg Body Pillow
Fat People Falling Gif
South Park Season 26 Kisscartoon
Jonathan Freeman : "Double homicide in Rowan County leads to arrest" - Bgrnd Search
Wfin Local News
Wal-Mart 140 Supercenter Products
Jesus Revolution Showtimes Near Chisholm Trail 8
Mawal Gameroom Download
Gwdonate Org
Classic Lotto Payout Calculator
Apus.edu Login
25Cc To Tbsp
How To Cancel Goodnotes Subscription
Inter-Tech IM-2 Expander/SAMA IM01 Pro
Rural King Credit Card Minimum Credit Score
Qhc Learning
Football - 2024/2025 Women’s Super League: Preview, schedule and how to watch
Scream Queens Parents Guide
Form F-1 - Registration statement for certain foreign private issuers
Thick Ebony Trans
Dark Entreaty Ffxiv
Bidevv Evansville In Online Liquid
Sofia the baddie dog
Belledelphine Telegram
Rural King Credit Card Minimum Credit Score
Santa Barbara Craigs List
Co10 Unr
Craigslist Boerne Tx
How to Use Craigslist (with Pictures) - wikiHow
031515 828
Publix Daily Soup Menu
Bt33Nhn
Beth Moore 2023
Edict Of Force Poe
The Blackening Showtimes Near Regal Edwards Santa Maria & Rpx
Bismarck Mandan Mugshots
Nearest Ups Office To Me
What Does Code 898 Mean On Irs Transcript
Empires And Puzzles Dark Chest
Directions To The Closest Auto Parts Store
Postgraduate | Student Recruitment
Pa Legion Baseball
About Us
Dyi Urban Dictionary
Legs Gifs
Ics 400 Test Answers 2022
Nfl Espn Expert Picks 2023
Vrca File Converter
Inloggen bij AH Sam - E-Overheid
Haunted Mansion Showtimes Near The Grand 14 - Ambassador
Latest Posts
Article information

Author: Rev. Leonie Wyman

Last Updated:

Views: 6307

Rating: 4.9 / 5 (79 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Rev. Leonie Wyman

Birthday: 1993-07-01

Address: Suite 763 6272 Lang Bypass, New Xochitlport, VT 72704-3308

Phone: +22014484519944

Job: Banking Officer

Hobby: Sailing, Gaming, Basketball, Calligraphy, Mycology, Astronomy, Juggling

Introduction: My name is Rev. Leonie Wyman, I am a colorful, tasty, splendid, fair, witty, gorgeous, splendid person who loves writing and wants to share my knowledge and understanding with you.