SSH - Secure Shell
- Nagaprasad Vr
- Sep 13, 2021
- 2 min read

After the rise of internet majority of all communications started happening online through internet like messaging , sending files , sending sensitive information related to army and other forces . Initially when this type of communication emerged they were insecure like anyone in the between could try to intercept the data and he could have access to it as well .
So in order to make communication and data transfer secure a new technology was introduced which is the Secure Shell . Here shell is a software which is used in all operating systems to issue commands through command line interface and interact with the computer or a server.
SSH is basically a software built on client-server model . Through SSH we can connect to a remote server or a computer provided both has the SSH service running.
By connection through SSH one can transfer files , data , issue commands to perform various operations remotely and may things.
So how is this SSH secure ?
There are two methods in which a client can connect to a remote server through SSH
By knowing the username and password of the remote server or computer
By using asymmetrical cryptography.
Asymmetrical cryptography: In this method a key pair is generated namely public key and private key. key in the sense are a sequence of alphanumeric characters are generated in real time ,they may be of an arbitrary length for example 256 bit.
Both keys are stored in the client system initially. Private key is private to the client and should not be exposed , while public key can be exposed, so that others have access to it. The keys are generated in such a way with association that if a text message is encrypted with the public key then it could only be decrypted by the corresponding private key itself. So any data sent through this protocol will be encrypted and will not be accessible to any hacker or middle man.
In order to successfully connect to remote machines online without a username and password every time, a copy of public key should be present in the remote machine.
The connection is established as follows :
1.Both the machines are running SSH service on their respective machines.
2.The client server logs into the remote machine for the first time using username and password
2.The client server sends the copy of the public key to the remote machine
3.A random message is chosen and encrypted by the remote server and is sent to client server
4.The client server receives the cipher text and decrypts it and sends it back to remote server ,if this message matches with the original message then the client is verified for future connections without the need of entering the password again when he connects back to the remote machine.
5. So it is very important to have the corresponding private keys with us if we want to connect, if a hacker tries to connect using his private key then he wont be able to do that because his private key is different.
In this way connections and data both are secured.
Comments