Commands in SSH
There are multiple commands supported by SSH protocol, you can tap on the link if you want to know commands in SSH
How does generally WorkThe general asymmetric?
For performing encryption and decryption it uses asymmetric cipher. There are many encryption methods:
rsa, dsa, ed25519 etc.
The general procedure is:
- Public keys from the local computers (system) are passed to the server which is to be accessed.
- The server then identifies if the public key is registered.
- If so, the server then creates a new secret key and encrypts it with the public key which was sent to it via local computer.
- This encrypted code is sent to the local computer.
- This data is unlocked by the private key of the system and is sent to the server.
- The server after receiving this data verifies the local computer.
- SSH creates a route and all the encrypted data are transferred through it with no security issues.
SSH is key-based authentication that is not prone to brute-force attack. It is more convenient and secure than login IDs and passwords (which can be stolen in the middle). There is no exposure of valid credentials, if a server has been compromised.
Generating an SSH key pair
Open your command prompt
type : ssh-keygen
Press enter
It will ask you for a location. Press Enter for default location.
If its already there, press 'y' to overwrite.
You may enter passphrase as you like, press enter.
An example of generating an SSH Key pair in the latest version of Windows 10 is given below:
Generating SSH keys on Windows, Linux, generallywhich and Mac:
OMAC OsX and Linux : terminal (build in)
OWindows :- PuTTY
Introduction to SSH(Secure Shell) Keys
The SSH(Secure Shell) is an access credential that is used in the SSH Protocol. In other words, it is a cryptographic network protocol that is used for transferring encrypted data over the network. The port number of SSH is 22(Twenty-Two). It allows you to connect to a server, or multiple servers, without having to remember or enter your password for each system that is to log remotely from one system to another. It always comes in key pairs:
- Public key – Everyone can see it, no need to protect it. (for encryption function).
- Private key – Stays in computer, must be protected. (for decryption function).
Key pairs can be of the following types:
- User Key – If the public key and private key remain with the user.
- Host Key – If public key and private key are on a remote system.
- Session key – Used when a large amount of data is to be transmitted.