This page describes how various tools and programs function.
SSH also known as Secure Shell, is a network protocol that gives users, a secure way to access a computer over an unsecured network. SSH provides strong password authentication and public key verification, as well as encrypted data communication between two computers connecting over an open network.
Secure Shell was created to replace insecure terminal emulation or login programs, such as Telnet and rsh (remote shell). SSH enables the same functions, like logging in to and running terminal sessions on remote systems. SSH also replaces file transfer programs, such as File Transfer Protocol (FTP) and rcp (remote copy).
The most basic use of SSH
is to connect to a remote host for a terminal session. The command for that would be
ssh UserName@server.example.com
This command will establish a connection between the local host and the server, the user will be prompted with the remote host’s public key fingerprint
The authentication of host 'sample.ssh.com' cannot be established.
ECDSA key fingerprint is SHA256:fIeOO+66eOvuFtoF54z4UT7gS3oTTbrO0sxfxvhzBHw.
Are you sure you want to continue connecting (yes/no)?
If you answer with yes, the session will continue and the host key is stored in a file called known_hosts
. This file is located in your home directory and can be found in ~/.ssh/known_hosts
.
Once the key has been stored in the known_hosts
file, the client can connect directly to that server again, without the need for any approvals.
SSH keys are comparable to a very long password. SSH keys always come as a pair, and every pair is made up of a private
and public
key. If you want to connect to an SSH server, the private
key will remain on the host machine and will be used to decrypt information that is exchanged over the SSH protocol.
Warning: Private keys should always be handled securely - i.e. the system is fully encrypted and the private key is secured with a passphrase.
The public
key is used to encrypt information, it can be shared, and is used by the user as well as by the server. The key will be stored in an authorized_keys
file on the server, which can contain a list of authorized public keys. The file is usually located in ~/.ssh/authorized_keys
.
If you want to setup SSH keys, check the configure public key authentication section.