Get a Pentest and security assessment of your IT network.

Cyber Security

SSH Unencrypted Connections

TL;DR

Yes, SSH can be forced to use an unencrypted connection (though it’s highly insecure). This is usually done for testing or very specific legacy setups. Modern SSH defaults to strong encryption and authentication. We’ll cover how this happens and why you shouldn’t do it unless absolutely necessary.

How SSH Connections Work

SSH (Secure Shell) normally uses cryptography to protect your username, password, and the data sent between your computer and the server. It does this through key exchange algorithms, encryption ciphers, and authentication methods. An unencrypted connection bypasses these security measures.

Initiating an Unencrypted SSH Connection

  1. Server Configuration (sshd_config): The server needs to be configured to allow unencrypted connections. This is done by modifying the sshd_config file.
    • Edit the configuration file:
      sudo nano /etc/ssh/sshd_config
    • Find (or add) these lines and set them as follows:
      • KexAlgorithms none
      • Ciphers none
      • MACs none
    • Restart the SSH service:
      sudo systemctl restart sshd

      (or

      sudo service ssh restart

      on older systems)

  2. Client Connection Command: Use the -o option with specific settings to force an unencrypted connection.
    • Example command:
      ssh -o KexAlgorithms=none -o Ciphers=none -o MACs=none user@server_address
    • This tells the client to not negotiate any key exchange algorithms, ciphers or message authentication codes.

Why This Is Dangerous

  • Man-in-the-Middle Attacks: Without encryption, anyone on the network can see your username and password as they are sent to the server. They could also intercept and modify data being transferred.
  • Data Exposure: All data exchanged is in plain text, making it easy for attackers to steal sensitive information.
  • Compromised Server: If the server is compromised, an attacker can easily access all unencrypted connections.

Alternatives (Better Security)

  1. Use Strong Passwords: Always use strong, unique passwords for your SSH accounts.
  2. Key-Based Authentication: Use SSH keys instead of passwords. This is much more secure.
  3. Disable Password Authentication: Once you’ve set up key-based authentication, disable password authentication in sshd_config.
  4. Firewall Rules: Restrict access to your SSH port (usually port 22) to only trusted IP addresses.
  5. Regular Updates: Keep your SSH server and client software up-to-date with the latest security patches.

Important Note

Only use unencrypted connections for testing in a completely isolated environment where security is not a concern. Never use them on public networks or for production systems. Consider using SSH with strong encryption and authentication methods whenever possible to protect your cyber security.

Related posts
Cyber Security

Zip Codes & PII: Are They Personal Data?

Cyber Security

Zero-Day Vulnerabilities: User Defence Guide

Cyber Security

Zero Knowledge Voting with Trusted Server

Cyber Security

ZeroNet: 51% Attack Risks & Mitigation