SSH, also known as Secure Socket Shell, is a network protocol that provides administrators with a secure way to access a remote computer.
SSH is widely used by network administrators for managing systems and applications remotely, allowing them to log in to another computer over a network, execute commands and move files from one computer to another.
SSH uses public-key cryptography to authenticate the remote computer and allow it to authenticate the user, if necessary.
There are several ways to use SSH
- One is to use automatically generated public-private key pairs to simply encrypt a network connection, and then use password authentication to log on.
- Another is to use a manually generated public-private key pair to perform the authentication, allowing users or programs to log in without having to specify a password. In this scenario, anyone can produce a matching pair of different keys (public and private).
SSH is a protocol that can be used for many applications across many platforms including most Unix variants (Linux, the BSDs including Apple’s macOS, and Solaris), as well as Microsoft Windows.
SSH is typically used to log into a remote machine and execute commands, but it also supports tunneling, forwarding TCP ports .
It can transfer files using the associated SSH file transfer (SFTP) or secure copy (SCP) protocols. SSH uses the client-server model.
The standard TCP port 22 has been assigned for contacting SSH servers.
How to login on remote machine through ssh
ssh root@hostname
where root is username
Login with ssh keys
ssh -i mykey root@hostname
where mykey is key filename and i is -i stands for identity file