SSH For Dummies: What, Why, How?

Source: hostinger.com

Due to the evolution of cloud computing, it has become a necessity to access remote machines these days. Most of us access our cloud instances every day, whether for business or personal purposes. We can barely imagine what it would be like if we couldn’t control cloud instances from our local machine.

“While attending school in Helsinki, I discovered a password ‘sniffer’ attack in our university network.

To shield our data, I wrote a program to protect information as it moved from point to point throughout the network. I called it the ‘secure shell’, or SSH for short.” -Tatu Ylönen

Introduction

A protocol is a set of rules that define the language that computers can use to communicate.

How SSH works?

Source: hostinger.com

The SSH protocol is based on the client-server model. So, the SSH client must initiate an SSH connection with the SSH server. The SSH server’s identity is verified using public-key cryptography, and data is encrypted using symmetric key cryptography and hashing algorithms, keeping data transmitted in the ciphertext. In that way, data security and privacy are guaranteed between the client and the SSH server, reducing the possibility of man-in-the-middle attacks.

These are the steps involved in creating an SSH session:

  1. Clients contact servers to initiate a connection.
  2. A public cryptography key is sent by the server to the client.
  3. A secure channel is opened between the server and the client.
  4. The user logs into the server through their SSH client.

SSH Authentication

1. Public Key Authentication

2. Password Authentication

Learn More

SSH Vs. Telnet

source: node35.com

Telnet is the protocol that allows a user to communicate with a remote device like SSH. The key difference between these two protocol is security. SSH is far more secure than telnet. Telnet provides unencrypted connection between two computers whereas SSH provides encrypted connection. Telnet is old technology and rarely used these days.

How to Connect via SSH

ssh username@remote_host_ip_address

Type your password and hit Enter. If you are connecting to a remote host for the first time, it will ask you if you want to continue connecting. Just type yes and hit Enter.

Wanna connect with Key file? here

Troubleshoot?

  1. Remote host is up.
  2. IP address of remote machine is correct.
  3. Your username and password are correct.
  4. You are connected to the Internet.
  5. Remote host is listening for SSH connections.
  6. SSH connection is not being blocked by firewall.

SSH Security

  1. Use SSH Protocol Version.
  2. Change default SSH Port.
  3. Use SSH Keys Instead of Passwords.
  4. Set Password Attempt Limit.
  5. Disable Direct Root Access.
  6. Use Firewall.
  7. Reject Connection Requests With No Passwords.

Conclusion

Hola! They call me Hacker