What Is SSH?

What Is SSH

Date First Published: 18th March 2022

Topic: Computer Networking

Subtopic: Internet Protocols

Article Type: Computer Terms & Definitions

Difficulty: Medium

Difficulty Level: 6/10

CONTENTS

Learn more about what SSH is in this article.

Short for Secure Shell, SSH is an application-layer protocol used as a secure method of communicating with a server or remote device. It works in a similar way to Telnet, since it uses a command-line interface rather than a graphical-user interface with windows, icons, and menus, and enables a remote connection to another device.

SSH is much more secure than Telnet because it uses public-key encryption to encrypt messages into ciphertext (encrypted text). If an attacker tried to intercept the sent information, such as the credentials, they would only see random text, which is unreadable by humans. The encryption works by using highly complex mathematical formulas to scramble the sent information in order for it to not be read by anyone else. SSH was designed to replace the insecure protocol, Telnet, and as of now, it is highly recommended to use SSH rather than Telnet for security reasons.

Note: Info Icon

In SSH, the word ‘Shell’ means that SSH is based on Unix shell, a program used for understanding and running the commands that are typed by a user. SSH uses port 22 by default. Originally, SSH was created as a Unix-based command, but it is also supported on the Windows operating system.

SSH is most commonly used by network administrators and developers who need to use specific applications hosted on a server or remote device. Functions, such as logging into another computer over a network remotely, running commands, securely managing network infrastructure components, and transferring files from one computer to another through the use of FTP can be performed by SSH. In addition, SSH can be used in scripts and other software for enabling programs and systems to remotely access data in a secure way. SSH is difficult to use for inexperienced users or users who are unfamiliar with Unix commands to use because it requires knowledge of these.

SSH Commands

SSH can be accessed by typing ‘ssh’ and an IP address or domain name on a terminal or SSH client, such as:

  • Ssh 123.122.121.120
  • Ssh example.com

Once a user has successfully connected to the host, they will be asked for their password. In addition, a custom port can be specified by typing this command:

  • Ssh example.com -p 323

By default, SSH uses port 22 and in most cases, it is unnecessary for a custom port to be specified.

A lot of SSH commands exist, including:

  • Pwd - To show the file system path.
  • Is - To list the contents of a current working folder.
  • -A - To display hidden files and entries that start with a dot.
  • -L - To show file details for directory contents.
  • -S - To list the size of files.
  • Cd - To navigate to a specific folder.
  • Cp- To copy a file or a directory.
  • Mv - To move a file to another location.
  • Touch - To create a new file with any extension (e.g. typing ‘touch file.html’ will create that specified file.
  • Mkdir - To create a directory.
  • Rm - To delete a file.
  • Ssh-keygen - To generate a new authentication key pair for improving the security of SSH connections, which consists of a public and private key. The public key is shared and the private key is hidden from the public.
  • Ssh-add - To add a key to the SSH authentication agent.
  • Ssh-agent - To track identity keys and passphrases.
  • Ssh-copy-id - To copy, install, and configure an SSH key on a server.
TCP/IP Protocol
Application layer BGPDHCPDNSFTPHTTPIMAPLDAPMGCPNNTPNTPOSPFPOPPTPONC/RPCRTPRTSPRIPSIPSMTPSNMPSSHTelnetXMPP
Transport layer TCPUDPDCCPSCTPRSVPQUIC
Internet layer IPICMPNDPECNIGMP.
Link layer TunnelsPPPMAC


Feedback

  • Is there anything that you disagree with on this page?
  • Are there any spelling, grammatical, or punctuation errors on this page?
  • Are there any broken links or design errors on this page?

If so, it is important that you tell me as soon as possible on this page.