TodayTools

Compare protocols

SSH vs SSL/TLS: two locks for different doors

Donate
What brings you here?

The difference at a glance

SSH

Secure Shell

Best for: Logging in to a server

Logs you in to a server so you can run commands.
  1. Host key, from Server
  2. Your key, from You
  3. Command, from You, locked
  4. Output, from Server, locked

TLS (SSL)

Transport Layer Security

Best for: Websites, APIs and mail

Locks any app's traffic, with a certificate as proof.
  1. Hello, from You
  2. Certificate, from Website
  3. Request, from You, locked
  4. Page, from Website, locked

The short answer

SSH and TLS both encrypt a connection, but they do different jobs. SSH gives you a secure terminal, file transfer and tunnels to a machine you log in to, usually with a key, on port 22. TLS (the modern name for SSL) secures other protocols like HTTPS and email, and proves the server's identity with a certificate from a trusted authority.

Which one fits you?

Tick everything that is true for you.

What do you need?

Your pick shows here

Tick one or more lines and we weigh them for you.

SSH and TLS (SSL) side by side

SSH vs SSL/TLS: differences row by row
What differsSSHTLS (SSL)
Main jobRemote login, commands, file transfer, tunnelsSecuring other protocols: HTTPS, IMAP, SMTP and more
Port22None of its own: 443 for HTTPS, 993 for IMAP, and so on
Proving the serverHost key, trusted on first use (known_hosts)Certificate signed by a certificate authority
Proving the userUsually a key pair, or a passwordRarely: the app handles logins, client certificates are optional
Inside the tunnelSeveral channels: shell, SFTP, port forwardsOne byte stream for one app protocol
Current versionSSH-2TLS 1.3 (SSL 2.0 and 3.0 are retired)
StandardRFC 4251 to RFC 4254RFC 8446 (TLS 1.3)

Watch each one work

Each page plays the real packets on a map, step by step, with every header explained.

Test yourself

Each line describes one of the two. Which one?

Question 1 of 7

Main job

Remote login, commands, file transfer, tunnels

Questions people ask

Is SSH based on SSL?

No. SSH and SSL/TLS were designed separately and use different handshakes, key formats and trust models. They share ideas like key exchange and symmetric ciphers.

Is SSL still used?

Not as a protocol. Every SSL version is retired because of known attacks. When people say SSL today, they almost always mean TLS.

Which is more secure, SSH or TLS?

Both are strong when kept up to date. The difference is in trust: SSH asks you to accept a host key the first time, while TLS checks a certificate chain for you.

Do SSH keys and SSL certificates work the same way?

Both use public key cryptography. An SSL certificate is a public key signed by an authority. A plain SSH key has no signature and is trusted because you added it yourself.

More comparisons

Donate