AttackEthical Hacking

What is Secure Shell (SSH) | How to Works SSH | All Details

SSH stands for Secure Shell or Secure Socket Shell. It is a cryptographic network operating system that allows two computers to communicate and share information through an insecure network such as the Internet. Used for remote login server to execute commands and transfer data from one machine to another.

The SSH protocol was developed by SSH communication security Ltd for secure communication with remote machine.

Secure connection provides strong password authentication and encrypted public communications over an unprotected channel. It is used to replace unsecured login agreements such as Telnet, rlogin, rsh, etc and insecure file transfer protocol FTP.

Its security features are widely used by network administrators to manage systems and applications remotely.

The SSH protocol protects the network from various attacks such as DNS spoofing, IP source routing, and IP spoofing.


Usages of SSH Protocol

The popular usages of SSH protocol are given below:

  • provides secure access to users and automated processes.
  • It is an easy and secure way to transfer files from one system to another over an insecure network.
  • also issues remote commands to the users.
  • helps the users to manage the network infrastructure and other critical system components.
  • It is used to log in to shell on a remote system (Host), which replaces Telnet and rlogin and is used to execute a single command on the host, which replaces rsh.
  • combines with rsync utility to backup, copy, and mirror files with complete security and efficiency.
  • I can be used for forwarding a port.
  • By using SSH, we can set up the automatic login to a remote server such as OpenSSH.
  • We can securely browse the web through the encrypted proxy connection with the SSH client, supporting the SOCKS protocol.


How does SSH Works?


The SSH protocol works on a client-server model, which means it connects to a secure client system (Finish where the session is displayed) and an SSH server (Finish where the session is conducted).

As mentioned above, it was originally developed to replace unsecured login terms such as Telnet, rlogin, which is why it does the same job.


The basic use of SSH to connect to the remote system for the last session is to do this, using the following command:

ssh [email protected] 


The above command enables the client to connect to a server, named, using a user ID.

When we connect for the first time, it will notify you of fingerprints for the public key and request a connection. The message below will be notified immediately:

The authenticity of host '' cannot be established. 
DSA key fingerprint is 01:23:45:67:89:ab:cw:ed:fw:ff:dc:aa:92:66:74:12:40. 
Are you sure you want to continue connecting (yes/no)?  


To continue with the session, we need to click yes, if not no. If we click yes, then the hosting key will be stored in the known_hosts local program file. The key is contained within an auto-hidden file, which is / .ssh / known_hosts in the home directory. When the host key is stored in this encrypted file, there is no need to continue with authorization as the host key will verify the connection automatically.


User authentication layer

As its name suggests, the user authentication layer is responsible for managing client authentication and providing a variety of authentication methods. Authentication is done on the customer side; this is why when the occurrence occurs with a password, the SSH client is usually on a server, and the server responds to this verification.

This layer incorporates various methods of authentication; These methods are:

  • Password: Password verification is a straightforward way to authenticate. Includes the password change feature for easy access.
  • Public Key: Public key is a public-based key authentication method, supporting keys for DSA, ECDSA, or RSA.
  • Keyboard-interactive: It is one of the most flexible authentication methods. In this case, the server sends the incentive to enter the data and the client sends it back with the user-entered responses. Used to provide one-time password or OTP authentication.
  • GSSAPI: In this way, authentication is done through external methods such as Kerberos 5 or NTLM, which provides single login for SSH sessions.


Connection layer

The connection layer describes the various channels where SSH services are provided. Explains the concept of channels, channel applications, and global applications. A single SSH connection can host multiple channels simultaneously and can transfer data to both indicators simultaneously. The most common types of link layer channel are:

  • shell: Used for storage shells, SFTP, and exec applications.
  • direct-tcpip: Used for customer-to-server communication.
  • forwarded-tcpip: Used for server-to-client communications.



What can be transmitted via SSH protocol?

The SSH protocol may convey the following:

  • Data
  • Text
  • Instructions
  • Files

Files are transferred using SFTP (Secure file transfer protocol), an encrypted version of FTP that provides security to prevent any threats.



Differences between SSH and Telnet

  • Telnet was the first protocol for an online application used to create and maintain a final session on a web host.
  • Both SSH and Telnet have similar performance. However, the main difference is that the SSH protocol is protected by public key authentication which ensures the final point during the final session setting. On the other hand, there is no guarantee given to Telnet for user authentication, which makes it a bit more secure.
  • SSH sends encrypted data, while Telnet sends encrypted data.
  • Due to the high security, SSH is the preferred protocol for social networks, while due to low security, Telnet is suitable for private networks.
  • SSH operates port 22 automatically, but can be customized, while Telnet uses 23 ports, designed for a local network.

Mr Admin

Hello, I'm SUMAN from India. I’m currently working on Cyber Ethical Hacking. I’m currently learning more about Hacking, Web Design, Coding, Android ROM

Related Articles

Inline Feedbacks
View all comments
Back to top button
Would love your thoughts, please comment.x